Permalink
Browse files

LLVM optimizations (unused for now)

  • Loading branch information...
1 parent 5601455 commit cd07a54a6243f6a85a3e5f5ed93f26c70138da16 @kripken kripken committed Nov 8, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 Avc/make.py
View
@@ -51,6 +51,15 @@
Popen(['make', '-j', '4'], env=env).communicate()
+if 0:
+ print 'LLVM optimizations'
+
+ shutil.move('avc.bc', 'avc.orig.bc')
+ output = Popen([emscripten.LLVM_OPT, 'avc.orig.bc'] +
+ emscripten.pick_llvm_opts(3, handpicked=True) +
+ ['-o=avc.bc'], stdout=PIPE, stderr=STDOUT).communicate()[0]
+ assert os.path.exists('avc.bc'), 'Failed to run llvm optimizations: ' + output
+
print 'LLVM binary => LL assembly'
print Popen([emscripten.LLVM_DIS] + emscripten.LLVM_DIS_OPTS + ['avc.bc', '-o=avc.ll']).communicate()

0 comments on commit cd07a54

Please sign in to comment.