summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/CodeFolding.cpp2
-rw-r--r--src/passes/LoopInvariantCodeMotion.cpp2
-rw-r--r--src/passes/SimplifyLocals.cpp2
-rw-r--r--src/passes/Vacuum.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/CodeFolding.cpp b/src/passes/CodeFolding.cpp
index 7a492dbea..0323223e1 100644
--- a/src/passes/CodeFolding.cpp
+++ b/src/passes/CodeFolding.cpp
@@ -319,7 +319,7 @@ private:
// conservative approximation because there can be cases that 'try' is
// within the expression that may throw so it is safe to take the
// expression out.
- if (effects.throws && !FindAll<Try>(outOf).list.empty()) {
+ if (effects.throws() && !FindAll<Try>(outOf).list.empty()) {
return false;
}
}
diff --git a/src/passes/LoopInvariantCodeMotion.cpp b/src/passes/LoopInvariantCodeMotion.cpp
index f339f8126..7fbd3ef55 100644
--- a/src/passes/LoopInvariantCodeMotion.cpp
+++ b/src/passes/LoopInvariantCodeMotion.cpp
@@ -125,7 +125,7 @@ struct LoopInvariantCodeMotion
(effects.readsMutableGlobalState() &&
loopEffects.writesGlobalState());
// TODO: look into optimizing this with exceptions. for now, disallow
- if (effects.throws || loopEffects.throws) {
+ if (effects.throws() || loopEffects.throws()) {
unsafeToMove = true;
}
if (!unsafeToMove) {
diff --git a/src/passes/SimplifyLocals.cpp b/src/passes/SimplifyLocals.cpp
index 8ed822774..35980f503 100644
--- a/src/passes/SimplifyLocals.cpp
+++ b/src/passes/SimplifyLocals.cpp
@@ -304,7 +304,7 @@ struct SimplifyLocals
if (curr->is<Try>()) {
std::vector<Index> invalidated;
for (auto& [index, info] : self->sinkables) {
- if (info.effects.throws) {
+ if (info.effects.throws()) {
invalidated.push_back(index);
}
}
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp
index abd54f334..6adab04e9 100644
--- a/src/passes/Vacuum.cpp
+++ b/src/passes/Vacuum.cpp
@@ -360,7 +360,7 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> {
void visitTry(Try* curr) {
// If try's body does not throw, the whole try-catch can be replaced with
// the try's body.
- if (!EffectAnalyzer(getPassOptions(), *getModule(), curr->body).throws) {
+ if (!EffectAnalyzer(getPassOptions(), *getModule(), curr->body).throws()) {
replaceCurrent(curr->body);
for (auto* catchBody : curr->catchBodies) {
typeUpdater.noteRecursiveRemoval(catchBody);