Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Unified Diff: pydir/run-llvm2ice.py

Issue 696383004: Disable Subzero IR generation for performance testing. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix issues in patch set 2, and add tests. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile.standalone ('k') | src/IceCfg.cpp » ('j') | src/PNaClTranslator.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/run-llvm2ice.py
diff --git a/pydir/run-llvm2ice.py b/pydir/run-llvm2ice.py
index 382467349861e675895f9efba867d06e13d7831a..d9f3c6312f23fe49215923e6d2f168dafaa58b67 100755
--- a/pydir/run-llvm2ice.py
+++ b/pydir/run-llvm2ice.py
@@ -47,6 +47,7 @@ def main():
action='store_true',
help='Trace command that generates ICE instructions')
argparser.add_argument('--args', '-a', nargs=argparse.REMAINDER,
+ default=[],
help='Remaining arguments are passed to llvm2ice')
args = argparser.parse_args()
@@ -60,6 +61,13 @@ def main():
raise RuntimeError("Can't specify both '--llvm-source' and " +
"'--no-local-syms'")
+ if '-noIRgen' in args.args or '--noIRgen' in args.args:
jvoung (off chromium) 2014/11/05 23:55:08 Is it possible to do: %if ... --command %p2i ...
Karl 2014/11/06 17:06:10 Done and Done.
+ # Short circuit if not allowed by llvm2ice
+ atts_cmd = [args.llvm2ice, '--build-atts']
+ build_atts = shellcmd(atts_cmd, echo=False).split()
+ if 'no_disable_ir_gen' in build_atts:
+ return
+
cmd = []
if not args.llvm_source:
cmd = [os.path.join(llvm_bin_path, 'llvm-as'), llfile, '-o', '-', '|',
@@ -78,8 +86,7 @@ def main():
cmd += ['--build-on-read=0']
else:
cmd += ['--build-on-read=1']
- if args.args:
- cmd += args.args
+ cmd += args.args
if args.llvm_source:
cmd += [llfile]
« no previous file with comments | « Makefile.standalone ('k') | src/IceCfg.cpp » ('j') | src/PNaClTranslator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698