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

Unified Diff: pydir/run-pnacl-sz.py

Issue 1210013005: Fixes case where terminator instruction is missing at end of function. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 6 months 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 | « no previous file | src/PNaClTranslator.cpp » ('j') | tests_lit/lit.cfg » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/run-pnacl-sz.py
diff --git a/pydir/run-pnacl-sz.py b/pydir/run-pnacl-sz.py
index e15b0960114162262d5b30fcdf01b160ec4eb22c..f6de30290f5e80537c2f26fb4f69ff962838823b 100755
--- a/pydir/run-pnacl-sz.py
+++ b/pydir/run-pnacl-sz.py
@@ -78,6 +78,10 @@ def main():
argparser.add_argument('--echo-cmd', required=False,
action='store_true',
help='Trace command that generates ICE instructions')
+ argparser.add_argument('--tbc', required=False, action='store_true',
+ help='Input is textual bitcode (not .ll)')
+ argparser.add_argument('--fail', required=False, action='store_true',
Jim Stichnoth 2015/06/29 22:43:12 Bikeshedding: how about something like '--expect-f
Karl 2015/06/30 18:46:09 Done.
+ help='Negate success of run by using LLVM not')
argparser.add_argument('--args', '-a', nargs=argparse.REMAINDER,
default=[],
help='Remaining arguments are passed to pnacl-sz')
@@ -93,13 +97,24 @@ def main():
raise RuntimeError("Can't specify both '--llvm-source' and " +
"'--no-local-syms'")
+ if args.llvm_source and args.tbc:
+ raise RuntimeError("Can't specify '--tbc' and '--llvm-source'")
Jim Stichnoth 2015/06/29 22:43:12 "Can't specify both ..." for consistency?
Karl 2015/06/30 18:46:09 Done.
+
+ if args.llvm and args.tbc:
+ raise RuntimeError("Can't specify '--tbc' and '--llvm'")
+
cmd = []
- if not args.llvm_source:
+ if args.tbc:
+ cmd = [os.path.join(pnacl_bin_path, 'pnacl-bcfuzz'), llfile,
+ '-bitcode-as-text', '-output', '-', '|']
+ elif not args.llvm_source:
cmd = [os.path.join(pnacl_bin_path, 'llvm-as'), llfile, '-o', '-', '|',
os.path.join(pnacl_bin_path, 'pnacl-freeze')]
if not args.no_local_syms:
cmd += ['--allow-local-symbol-tables']
cmd += ['|']
+ if args.fail:
+ cmd += [os.path.join(pnacl_bin_path, 'not')]
cmd += [args.pnacl_sz]
cmd += ['--target', args.target]
if args.insts:
« no previous file with comments | « no previous file | src/PNaClTranslator.cpp » ('j') | tests_lit/lit.cfg » ('J')

Powered by Google App Engine
This is Rietveld 408576698