aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-01 18:37:13 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-01 18:37:13 -0800
commit1549a85427fe76243a5cd1191e57b0a9cb867e5a (patch)
treea951339c4ac9b83d86f42cb270b5ea98df6d32b7 /emcc
parent97bcf966151e76ab22c4dcf701000efe1e08c3f6 (diff)
llvm inlining support (disabled by default; enabled in benchmarks)
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc7
1 files changed, 5 insertions, 2 deletions
diff --git a/emcc b/emcc
index 590fc63a..d50b5a88 100755
--- a/emcc
+++ b/emcc
@@ -569,8 +569,11 @@ try:
if DEBUG: save_intermediate('opt', 'bc')
# Do LTO in a separate pass to work around LLVM bug XXX (see failure e.g. in cubescript)
if shared.Building.can_use_unsafe_opts() and shared.Building.can_build_standalone():
- if DEBUG: print >> sys.stderr, 'emcc: LLVM LTO'
- shared.Building.llvm_opt(in_temp(target_basename + '.bc'), ['-disable-inlining', '-std-link-opts'])
+ lto_opts = []
+ if not shared.Building.can_inline(): lto_opts.append('-disable-inlining')
+ lto_opts.append('-std-link-opts')
+ if DEBUG: print >> sys.stderr, 'emcc: LLVM LTO:', lto_opts
+ shared.Building.llvm_opt(in_temp(target_basename + '.bc'), lto_opts)
if DEBUG: save_intermediate('lto', 'bc')
else:
# If possible, remove dead functions etc., this potentially saves a lot in the size of the generated code (and the time to compile it)