diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-01 18:37:13 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-01 18:37:13 -0800 |
commit | 1549a85427fe76243a5cd1191e57b0a9cb867e5a (patch) | |
tree | a951339c4ac9b83d86f42cb270b5ea98df6d32b7 /tests/runner.py | |
parent | 97bcf966151e76ab22c4dcf701000efe1e08c3f6 (diff) |
llvm inlining support (disabled by default; enabled in benchmarks)
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index c082f855..93511589 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -5524,9 +5524,12 @@ Options that are modified or new in %s include: assert ('_puts(' in generated) == (opt_level >= 1), 'with opt >= 1, llvm opts are run and they should optimize printf to puts' assert ('function _malloc(bytes) {' in generated) == (not has_malloc), 'If malloc is needed, it should be there, if not not' assert 'function _main() {' in generated, 'Should be unminified, including whitespace' + assert 'function _dump' in generated, 'No inlining by default' # emcc -s RELOOP=1 src.cpp ==> should pass -s to emscripten.py. --typed-arrays is a convenient alias for -s USE_TYPED_ARRAYS for params, test, text in [ + (['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'), + (['-O1', '-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' not in generated, 'inlining'), (['-s', 'USE_TYPED_ARRAYS=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'), (['-s', 'USE_TYPED_ARRAYS=1'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'), ([], lambda generated: 'Module["_dump"]' not in generated, 'dump is not exported by default'), @@ -5799,6 +5802,7 @@ elif 'benchmark' in str(sys.argv): try_delete(final_filename) output = Popen([EMCC, filename, '-O3', + '-s', 'INLINING_LIMIT=0', '-s', 'TOTAL_MEMORY=100*1024*1024', '-s', 'FAST_MEMORY=10*1024*1024', '-o', final_filename] + emcc_args, stdout=PIPE, stderr=self.stderr_redirect).communicate() assert os.path.exists(final_filename), 'Failed to compile file: ' + '\n'.join(output) |