aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-17 12:42:36 +0100
committerAlon Zakai <alonzakai@gmail.com>2013-02-17 12:43:41 +0100
commitf9b489d426c89d9cab2ed372bd0a16b8bca5fa0e (patch)
treeadbd46847add674062db589bfa454ad7baec56c3
parent1ae2a2654a84f68d4b2618db6ccb2bb8336824b7 (diff)
default closure to off in all optimization levels - we rely on registerize for much faster effects on runtime speed
-rwxr-xr-xemcc13
-rwxr-xr-xtests/runner.py4
2 files changed, 9 insertions, 8 deletions
diff --git a/emcc b/emcc
index e971d955..027f25c7 100755
--- a/emcc
+++ b/emcc
@@ -153,9 +153,7 @@ Options that are modified or new in %s include:
compiling to JavaScript, not to intermediate
bitcode.
-O2 As -O1, plus the relooper (loop recreation),
- plus closure compiler advanced opts, plus
- LLVM -O2 optimizations
- Warning: Compiling with this takes a long time!
+ plus LLVM -O2 optimizations
-O3 As -O2, plus dangerous optimizations that may
break the generated code! This is not
recommended at all, see the wiki for more
@@ -204,8 +202,12 @@ Options that are modified or new in %s include:
(see --llvm-opts), setting this to 1 has no
effect.
- --closure <on> 0: No closure compiler (default in -O0, -O1)
- 1: Run closure compiler (default in -O2, -O3)
+ --closure <on> 0: No closure compiler (default)
+ 1: Run closure compiler. This greatly reduces
+ code size and may in some cases increase
+ runtime speed (although the opposite can also
+ occur). Note that it takes time to run, and
+ may require some changes to the code.
--js-transform <cmd> <cmd> will be called on the generated code
before it is optimized. This lets you modify
@@ -749,7 +751,6 @@ try:
if llvm_opts is None: llvm_opts = LLVM_OPT_LEVEL[opt_level]
if llvm_lto is None: llvm_lto = llvm_opts > 0
- if closure is None: closure = 1 if opt_level >= 2 else 0
if opt_level <= 0: keep_debug = True # always keep debug in -O0
if DEBUG: start_time = time.time() # done after parsing arguments, which might affect debug state
diff --git a/tests/runner.py b/tests/runner.py
index ee710fc9..45d41ace 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -8296,9 +8296,9 @@ Options that are modified or new in %s include:
(['-o', 'something.js', '-O0'], 0, None, 0, 0),
(['-o', 'something.js', '-O1'], 1, None, 0, 0),
(['-o', 'something.js', '-O1', '--closure', '1'], 1, None, 1, 0),
- (['-o', 'something.js', '-O2'], 2, None, 1, 1),
+ (['-o', 'something.js', '-O2'], 2, None, 0, 1),
(['-o', 'something.js', '-O2', '--closure', '0'], 2, None, 0, 0),
- (['-o', 'something.js', '-O3'], 3, None, 1, 1),
+ (['-o', 'something.js', '-O3'], 3, None, 0, 1),
(['-o', 'something.js', '-O3', '--closure', '0'], 3, None, 0, 0),
# and, test compiling to bitcode first
(['-o', 'something.bc'], 0, [], 0, 0),