Commit 1248a6d1 by Jan Voung

Make py import not assume dir is "pnacl-subzero". Avoid autovect in crosstest.

Derek's CL to check out subzero calls the source directory "subzero", and the file header comments call the directory "subzero". Just make the python sys.path munging for importing pydir more generic. Also change crosstest to not run the raw LLVM "opt" with optimizations (only use it for ABI stabilization passes). Instead run pnacl-clang with -O2. Otherwise, newer NACL_SDK versions include a newer LLVM "opt" binary which autovectorizes and may generate vector IR that is not handled by Subzero yet. E.g., LLVM ERROR: Invalid PNaCl instruction: %1 = insertelement <4 x i32> undef, i32 %0, i32 0 w/ pepper_canary to version 37, revision 274873 BUG=none TEST=make -f Makefile.standalone check R=stichnot@chromium.org, wala@chromium.org Review URL: https://codereview.chromium.org/317963002
parent ab8242ca
...@@ -7,10 +7,7 @@ import re ...@@ -7,10 +7,7 @@ import re
import subprocess import subprocess
import sys import sys
for p in sys.path: sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pydir'))
if p.endswith('/toolchain_build/src/pnacl-subzero'):
sys.path.insert(0, p + '/pydir')
break
from utils import shellcmd from utils import shellcmd
......
...@@ -40,10 +40,10 @@ Please set the NACL_SDK_ROOT environment variable or pass the path through ...@@ -40,10 +40,10 @@ Please set the NACL_SDK_ROOT environment variable or pass the path through
pnaclname = basename + '.pnacl.ll' pnaclname = basename + '.pnacl.ll'
pnaclname = os.path.join(args.dir, pnaclname) pnaclname = os.path.join(args.dir, pnaclname)
shellcmd(clang_path + ' -I{0} -c {1} -o {2}'.format( shellcmd(clang_path + ' -O2 -I{0} -c {1} -o {2}'.format(
includes_path, cname, llname)) includes_path, cname, llname))
shellcmd(opt_path + shellcmd(opt_path +
' -O2 -pnacl-abi-simplify-preopt -pnacl-abi-simplify-postopt' + ' -pnacl-abi-simplify-preopt -pnacl-abi-simplify-postopt' +
('' if args.disable_verify else ('' if args.disable_verify else
' -verify-pnaclabi-module -verify-pnaclabi-functions') + ' -verify-pnaclabi-module -verify-pnaclabi-functions') +
' -pnaclabi-allow-debug-metadata -disable-simplify-libcalls' ' -pnaclabi-allow-debug-metadata -disable-simplify-libcalls'
......
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