From dc797a4570fcb776020c886581f6de7feaf734ea Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 17 Mar 2014 12:53:02 -0700 Subject: make simplifyIfs a settings option --- emcc | 2 +- src/settings.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/emcc b/emcc index 471cbb76..4ba63f21 100755 --- a/emcc +++ b/emcc @@ -1691,7 +1691,7 @@ try: # 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 shared.Settings.SIMPLIFY_IFS and (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'] diff --git a/src/settings.js b/src/settings.js index 8e0d9e2d..8b046e95 100644 --- a/src/settings.js +++ b/src/settings.js @@ -172,6 +172,7 @@ var OUTLINING_LIMIT = 0; // A function size above which we try to automatically // it). var AGGRESSIVE_VARIABLE_ELIMINATION = 0; // Run aggressiveVariableElimination in js-optimizer.js +var SIMPLIFY_IFS = 1; // Whether to simplify ifs in js-optimizer.js // Generated code debugging options var SAFE_HEAP = 0; // Check each write to the heap, for example, this will give a clear -- cgit v1.2.3-18-g5258