From d0e1b15337e04eb16b356e3149dba1763da02b29 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 29 May 2020 10:54:59 -0700 Subject: 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. --- src/passes/CodePushing.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/passes/CodePushing.cpp') 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 toPush; Index i = pushPoint - 1; while (1) { -- cgit v1.2.3