summaryrefslogtreecommitdiff
path: root/src/passes/CodePushing.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-05-29 10:54:59 -0700
committerGitHub <noreply@github.com>2020-05-29 10:54:59 -0700
commitd0e1b15337e04eb16b356e3149dba1763da02b29 (patch)
tree57fde0c1203766ce0d87c4157a290483009251b5 /src/passes/CodePushing.cpp
parentdfe473e6af0a31cad7a7b26f5dead358d9bbf536 (diff)
downloadbinaryen-d0e1b15337e04eb16b356e3149dba1763da02b29.tar.gz
binaryen-d0e1b15337e04eb16b356e3149dba1763da02b29.tar.bz2
binaryen-d0e1b15337e04eb16b356e3149dba1763da02b29.zip
Refactor Effects (#2873)
Avoid special work in analyze(). This lets breakTargets always reflect the breaks that we've seen and that might be external, and we check it in hasSideEffects etc. Also do some internal refactoring and renamings for clarity.
Diffstat (limited to 'src/passes/CodePushing.cpp')
-rw-r--r--src/passes/CodePushing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/CodePushing.cpp b/src/passes/CodePushing.cpp
index 7fa50f39b..7af192838 100644
--- a/src/passes/CodePushing.cpp
+++ b/src/passes/CodePushing.cpp
@@ -163,7 +163,9 @@ private:
cumulativeEffects.analyze(list[pushPoint]);
// it is ok to ignore the branching here, that is the crucial point of this
// opt
- cumulativeEffects.branches = false;
+ // TODO: it would be ok to ignore thrown exceptions here, if we know they
+ // could not be caught and must go outside of the function
+ cumulativeEffects.ignoreBranches();
std::vector<LocalSet*> toPush;
Index i = pushPoint - 1;
while (1) {