Commit 42356fb7 by Jim Stichnoth

Subzero: Add "szbuild.py --no-sz" arg for suppressing the pnacl-sz run.

This enables the following workflow: 1. Run "szbuild.py --filetype=asm ..." to generate a .s file. 2. Edit the .s file to mock up a Subzero change. 3. Run "szbuild.py --filetype=asm --no-sz ..." to restart the build post pnacl-sz. This workflow is good for trying out localized changes to hot basic blocks, though it isn't really appropriate for global optimizations like register allocation. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1417003005 .
parent af5d44c6
......@@ -98,6 +98,8 @@ def AddOptionalArgs(argparser):
help='Extra arguments for Subzero')
argparser.add_argument('--llc', dest='llc_args', action='append',
default=[], help='Extra arguments for llc')
argparser.add_argument('--no-sz', dest='nosz', action='store_true',
help='Run only post-Subzero build steps')
def main():
"""Create a hybrid translation from Subzero and llc.
......@@ -216,22 +218,24 @@ def ProcessPexe(args, pexe, exe):
if (args.force or
NewerThanOrNotThere(pexe, obj_sz) or
NewerThanOrNotThere(pnacl_sz, obj_sz)):
# Run pnacl-sz regardless of hybrid mode.
shellcmd([pnacl_sz,
'-O' + opt_level,
'-bitcode-format=pnacl',
'-filetype=' + args.filetype,
'-o', obj_sz if args.filetype == 'obj' else asm_sz,
'-target=' + args.target] +
(['-externalize',
'-ffunction-sections',
'-fdata-sections'] if hybrid else []) +
(['-sandbox'] if args.sandbox else []) +
(['-enable-block-profile'] if
args.enable_block_profile and not args.sandbox else []) +
args.sz_args +
[pexe],
echo=args.verbose)
if not args.nosz:
# Run pnacl-sz regardless of hybrid mode.
shellcmd([pnacl_sz,
'-O' + opt_level,
'-bitcode-format=pnacl',
'-filetype=' + args.filetype,
'-o', obj_sz if args.filetype == 'obj' else asm_sz,
'-target=' + args.target] +
(['-externalize',
'-ffunction-sections',
'-fdata-sections'] if hybrid else []) +
(['-sandbox'] if args.sandbox else []) +
(['-enable-block-profile'] if
args.enable_block_profile and not args.sandbox
else []) +
args.sz_args +
[pexe],
echo=args.verbose)
if args.filetype != 'obj':
triple = {
'arm32': 'arm-nacl' if args.sandbox else 'arm',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment