summaryrefslogtreecommitdiff
path: root/src/passes/Vacuum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Vacuum.cpp')
-rw-r--r--src/passes/Vacuum.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp
index dec4add01..abd54f334 100644
--- a/src/passes/Vacuum.cpp
+++ b/src/passes/Vacuum.cpp
@@ -103,7 +103,7 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> {
// Check if this expression itself has side effects, ignoring children.
EffectAnalyzer self(getPassOptions(), *getModule());
self.visit(curr);
- if (self.hasSideEffects()) {
+ if (self.hasUnremovableSideEffects()) {
return curr;
}
// The result isn't used, and this has no side effects itself, so we can
@@ -111,7 +111,7 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> {
SmallVector<Expression*, 1> childrenWithEffects;
for (auto* child : ChildIterator(curr)) {
if (EffectAnalyzer(getPassOptions(), *getModule(), child)
- .hasSideEffects()) {
+ .hasUnremovableSideEffects()) {
childrenWithEffects.push_back(child);
}
}
@@ -378,7 +378,7 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> {
}
if (curr->getResults() == Type::none &&
!EffectAnalyzer(getPassOptions(), *getModule(), curr->body)
- .hasSideEffects()) {
+ .hasUnremovableSideEffects()) {
ExpressionManipulator::nop(curr->body);
}
}