diff options
Diffstat (limited to 'src/passes/RemoveUnusedBrs.cpp')
-rw-r--r-- | src/passes/RemoveUnusedBrs.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp index f383f669a..3c4723c7f 100644 --- a/src/passes/RemoveUnusedBrs.cpp +++ b/src/passes/RemoveUnusedBrs.cpp @@ -85,6 +85,9 @@ static bool canTurnIfIntoBrIf(Expression* ifCondition, // It can be tuned more later. const Index TooCostlyToRunUnconditionally = 9; +static_assert(TooCostlyToRunUnconditionally < CostAnalyzer::Unacceptable, + "We never run code unconditionally if it has unacceptable cost"); + // Check if it is not worth it to run code unconditionally. This // assumes we are trying to run two expressions where previously // only one of the two might have executed. We assume here that |