diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-16 11:00:50 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-16 11:00:50 -0700 |
commit | ce33f9c21230d619b2b5d42358592f204410eab4 (patch) | |
tree | db3833edea5f4ad5599da9a6060b81946c9d7f20 /emcc | |
parent | cf2846e05a399598f128db8106a87bc30a8f0c2c (diff) |
enable aliasing function pointers by default in -O2
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -163,7 +163,10 @@ Options that are modified or new in %s include: EMCC_OPTIMIZE_NORMALLY=1 (not recommended unless you know what you are doing!) -O2 As -O1, plus the relooper (loop recreation), - plus LLVM -O2 optimizations + LLVM -O2 optimizations, and + + -s ALIASING_FUNCTION_POINTERS=1 + -O3 As -O2, plus dangerous optimizations that may break the generated code! This adds @@ -1032,6 +1035,9 @@ try: shared.Settings.CORRECT_OVERFLOWS = 1 assert not shared.Settings.PGO, 'cannot run PGO in ASM_JS mode' + if shared.Settings.ASSERTIONS and shared.Settings.ALIASING_FUNCTION_POINTERS: + logging.warning('ALIASING_FUNCTION_POINTERS is on, function pointer comparisons may be invalid across types') + if shared.Settings.CORRECT_SIGNS >= 2 or shared.Settings.CORRECT_OVERFLOWS >= 2 or shared.Settings.CORRECT_ROUNDINGS >= 2: keep_llvm_debug = True # must keep debug info to do line-by-line operations |