aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-15 15:44:14 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-17 17:56:17 -0700
commit6c31546ced32fd968ae50da7803964c9195ebd62 (patch)
tree46ddb131a57a612e83f5d00efe847d3794725c94 /emcc
parentf6c2bcd2a3058b4b36518aa4cabec2baa7222970 (diff)
uncommaify between ifs that can potentially be simplified
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc4
1 files changed, 3 insertions, 1 deletions
diff --git a/emcc b/emcc
index 3845beb1..471cbb76 100755
--- a/emcc
+++ b/emcc
@@ -1689,7 +1689,9 @@ try:
js_optimizer_queue += ['simplifyExpressions']
- if debug_level == 0 or profiling: js_optimizer_queue += ['simplifyIfs']
+ # simplify ifs if it is ok to make the code somewhat unreadable, and unless outlining (simplified ifs
+ # with commaified code breaks late aggressive variable elimination)
+ if (debug_level == 0 or profiling) and shared.Settings.OUTLINING_LIMIT == 0: js_optimizer_queue += ['simplifyIfs']
if opt_level >= 3 and shared.Settings.PRECISE_F32: js_optimizer_queue += ['optimizeFrounds']