Permalink
Browse files

move llvm opt debug messages

  • Loading branch information...
1 parent 86eb2f8 commit cbf61df3d0542f5ee91e93835cc8e9cc87446035 @kripken committed Dec 25, 2012
Showing with 1 addition and 2 deletions.
  1. +0 −2 emcc
  2. +1 −0 tools/shared.py
View
2 emcc
@@ -1050,7 +1050,6 @@ try:
if not LEAVE_INPUTS_RAW:
link_opts = [] if keep_debug else ['-strip-debug']
if llvm_opts > 0:
- if DEBUG: print >> sys.stderr, 'emcc: LLVM -O%d' % llvm_opts
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), llvm_opts)
if DEBUG: save_intermediate('opt', 'bc')
# Do LTO in a separate pass to work around LLVM bug XXX (see failure e.g. in cubescript)
@@ -1063,7 +1062,6 @@ 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']
- if DEBUG: print >> sys.stderr, 'emcc: LLVM linktime:', link_opts
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), link_opts)
if DEBUG: save_intermediate('linktime', 'bc')
View
@@ -819,6 +819,7 @@ def ll_opts(filename):
def llvm_opt(filename, opts):
if type(opts) is int:
opts = Building.pick_llvm_opts(opts)
+ if DEBUG: print >> sys.stderr, 'emcc: LLVM opts:', opts
output = Popen([LLVM_OPT, filename] + opts + ['-o=' + filename + '.opt.bc'], stdout=PIPE).communicate()[0]
assert os.path.exists(filename + '.opt.bc'), 'Failed to run llvm optimizations: ' + output
shutil.move(filename + '.opt.bc', filename)

0 comments on commit cbf61df

Please sign in to comment.