diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-10-26 10:42:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-26 10:42:48 -0700 |
commit | e120601c0b2cbc5722950fb1ce7d0901842f5dff (patch) | |
tree | cffc0124e0fd4fc41ec7d8d8083722c7e66a2d67 /src/ast_utils.h | |
parent | c5ab566cc3343d3b9e07eab4855b0dbfb2c81afe (diff) | |
download | binaryen-e120601c0b2cbc5722950fb1ce7d0901842f5dff.tar.gz binaryen-e120601c0b2cbc5722950fb1ce7d0901842f5dff.tar.bz2 binaryen-e120601c0b2cbc5722950fb1ce7d0901842f5dff.zip |
Conditionalize boolean operations based on cost (#805)
When we have expensive | expensive, and both are boolean, then we can execute one of them conditionally if it doesn't have side effects.
Diffstat (limited to 'src/ast_utils.h')
-rw-r--r-- | src/ast_utils.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ast_utils.h b/src/ast_utils.h index 861a09aaf..9dfacb972 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -209,7 +209,8 @@ struct EffectAnalyzer : public PostWalker<EffectAnalyzer, Visitor<EffectAnalyzer void visitUnreachable(Unreachable *curr) { branches = true; } }; -// Meausure the size of an AST +// Measure the size of an AST + struct Measurer : public PostWalker<Measurer, UnifiedExpressionVisitor<Measurer>> { Index size = 0; |