diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-17 10:16:42 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-17 10:16:42 -0800 |
commit | acccc5e85ada70e963934bdf21dfeb501fe63d98 (patch) | |
tree | 70ca077bdff35d4243245cc8fd81dfaf80021413 /src/compiler.js | |
parent | bcf1a4f0e90b93a7771058fda56e4be1046af38a (diff) |
refactor PGO code
Diffstat (limited to 'src/compiler.js')
-rw-r--r-- | src/compiler.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler.js b/src/compiler.js index 15dd8dc3..3d33ed22 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -47,6 +47,12 @@ if (SAFE_HEAP >= 2) { SAFE_HEAP_LINES = set(SAFE_HEAP_LINES); // for fast checking } +if (PGO) { // by default, correct everything during PGO + CORRECT_SIGNS = CORRECT_SIGNS || 1; + CORRECT_OVERFLOWS = CORRECT_OVERFLOWS || 1; + CORRECT_ROUNDINGS = CORRECT_ROUNDINGS || 1; +} + EXPORTED_FUNCTIONS = set(EXPORTED_FUNCTIONS); EXPORTED_GLOBALS = set(EXPORTED_GLOBALS); @@ -57,7 +63,7 @@ assert(!(USE_TYPED_ARRAYS === 2 && QUANTUM_SIZE !== 4), 'For USE_TYPED_ARRAYS == // Output some info and warnings based on settings if (!OPTIMIZE || !RELOOP || ASSERTIONS || CHECK_SIGNS || CHECK_OVERFLOWS || INIT_STACK || INIT_HEAP || - !SKIP_STACK_IN_SMALL || SAFE_HEAP || AUTO_OPTIMIZE || PROFILE || !DISABLE_EXCEPTION_CATCHING) { + !SKIP_STACK_IN_SMALL || SAFE_HEAP || PGO || PROFILE || !DISABLE_EXCEPTION_CATCHING) { print('// Note: Some Emscripten settings will significantly limit the speed of the generated code.'); } else { print('// Note: For maximum-speed code, see "Optimizing Code" on the Emscripten wiki, https://github.com/kripken/emscripten/wiki/Optimizing-Code'); |