aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-01 13:59:09 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-01 13:59:09 -0800
commit397ed990199d06c4b3eb04e5abff437d1c5904ae (patch)
treeabe2c41e75c8da0ff2ca8020707ded38fd81102a /emcc
parentb5a2a33c4a8d97288f1be084e2d7b09627860dc8 (diff)
use reloop-relevant js optimizer passes only when actually relooping
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc12
1 files changed, 7 insertions, 5 deletions
diff --git a/emcc b/emcc
index 67c822e9..d35e6b1c 100755
--- a/emcc
+++ b/emcc
@@ -491,12 +491,14 @@ try:
save_intermediate('pretty')
if opt_level >= 1:
- # js optimizer
if DEBUG: print >> sys.stderr, 'emcc: running pre-closure post-opts'
- final = shared.Building.js_optimizer(final, ['hoistMultiples'])
- if DEBUG: save_intermediate('hoistMultiples')
- final = shared.Building.js_optimizer(final, ['loopOptimizer'])
- if DEBUG: save_intermediate('loopOptimizer')
+
+ if shared.Settings.RELOOP:
+ # js optimizer
+ final = shared.Building.js_optimizer(final, ['hoistMultiples'])
+ if DEBUG: save_intermediate('hoistMultiples')
+ final = shared.Building.js_optimizer(final, ['loopOptimizer'])
+ if DEBUG: save_intermediate('loopOptimizer')
# eliminator
final = shared.Building.eliminator(final)