diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-19 22:01:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-19 22:01:09 -0800 |
commit | 4efa4270a220da968cd039d724c96a091387b2b9 (patch) | |
tree | 806b5c51aa7f187afbe39a0c8b3d1e31da83baf2 | |
parent | ed65cfdcf12ed1187813ded47b578adcac1b9c67 (diff) |
simplify for fastcomp together with other link operations
-rwxr-xr-x | emcc | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1683,6 +1683,11 @@ try: else: # At minimum remove dead functions etc., this potentially saves a lot in the size of the generated code (and the time to compile it) link_opts += shared.Building.get_safe_internalize() + ['-globaldce'] + + # Simplify LLVM bitcode for fastcomp + if os.environ.get('EMCC_FAST_COMPILER'): + link_opts += ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt'] + if not save_bc and not os.environ.get('EMCC_FAST_COMPILER') and not AUTODEBUG: # let llvm opt directly emit ll, to skip writing and reading all the bitcode link_opts += ['-S'] @@ -1704,12 +1709,6 @@ try: assert len(input_files) == 1 if DEBUG and save_bc: save_intermediate('ll', 'll') - # Simplify LLVM bitcode for fastcomp - if os.environ.get('EMCC_FAST_COMPILER'): - logging.debug('simplifying LLVM IR for fastcomp') - shared.Building.llvm_opt(final, ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt']) - if DEBUG: save_intermediate('simple', 'bc') - if AUTODEBUG: logging.debug('autodebug') execute([shared.PYTHON, shared.AUTODEBUGGER, final, final + '.ad.ll']) |