diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-01 13:59:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-01 13:59:09 -0800 |
commit | 397ed990199d06c4b3eb04e5abff437d1c5904ae (patch) | |
tree | abe2c41e75c8da0ff2ca8020707ded38fd81102a /emcc | |
parent | b5a2a33c4a8d97288f1be084e2d7b09627860dc8 (diff) |
use reloop-relevant js optimizer passes only when actually relooping
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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) |