diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-21 11:42:18 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-21 11:42:18 -0800 |
commit | f13a917368638c051ddf362612d79e12af5d4086 (patch) | |
tree | f7c1ec7bda2e24f743408bee9e32ed4db44b36ed /tools | |
parent | 6fd223ee4e7f89495a2a07a4acf39ec678426b83 (diff) |
llvm optimizations tweaks
Diffstat (limited to 'tools')
-rw-r--r-- | tools/shared.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/shared.py b/tools/shared.py index 0a4219d8..5fc26a6d 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -231,12 +231,12 @@ class Building: shutil.move(filename + '.o', filename + '.o.pre') output = Popen([LLVM_OPT, filename + '.o.pre'] + Building.LLVM_OPT_OPTS + ['-o=' + filename + '.o'], stdout=PIPE).communicate()[0] assert os.path.exists(filename + '.o'), 'Failed to run llvm optimizations: ' + output - if Building.LLVM_OPTS == 2: - print 'Unsafe LD!' - shutil.move(filename + '.o', filename + '.o.pre') - output = Popen([LLVM_LD, filename + '.o.pre', '-o=' + filename + '.tmp'], stdout=PIPE).communicate()[0] - assert os.path.exists(filename + '.tmp.bc'), 'Failed to run llvm optimizations: ' + output - shutil.move(filename + '.tmp.bc', filename + '.o') + #if Building.LLVM_OPTS == 2: + # print 'Unsafe LD!' + # shutil.move(filename + '.o', filename + '.o.pre') + # output = Popen([LLVM_LD, filename + '.o.pre', '-o=' + filename + '.tmp'], stdout=PIPE).communicate()[0] + # assert os.path.exists(filename + '.tmp.bc'), 'Failed to run llvm optimizations: ' + output + # shutil.move(filename + '.tmp.bc', filename + '.o') @staticmethod def llvm_dis(filename): @@ -296,11 +296,12 @@ class Building: opts = [] if optimization_level > 0: + #opts.append('-disable-inlining') # we prefer to let closure compiler do our inlining if not safe: #opts.append('-O%d' % optimization_level) opts.append('-std-compile-opts') opts.append('-std-link-opts') - print 'Unsafe:', opts + print 'Unsafe:', opts, else: allow_nonportable = not safe optimize_size = True |