Commit 9f76aec7 by Jim Stichnoth

Subzero: Make threads=2 and filetype=obj the testing defaults.

Change crosstest.py's -elf argument to the now-standard -filetype and just pass it through to llvm2ice. This also fixes a leftover -elf-writer argument that should have been changed to -filetype=obj. It would be nice to change all the explicit -threads=0 to -threads=1 in the lit tests, but that uncovers too many assumptions about dump/emit output order, or ordering between function and global data emission. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/924023002
parent 7b300674
...@@ -65,9 +65,9 @@ if __name__ == '__main__': ...@@ -65,9 +65,9 @@ if __name__ == '__main__':
'from the same bitcode as the subzero object. ' + 'from the same bitcode as the subzero object. ' +
'If 0, then compile it straight from source.' + 'If 0, then compile it straight from source.' +
' Default %(default)d.') ' Default %(default)d.')
argparser.add_argument('--elf', dest='elf', argparser.add_argument('--filetype', default='obj', dest='filetype',
action='store_true', choices=['obj', 'asm', 'iasm'],
help='Directly generate ELF output') help='Output file type. Default %(default)s.')
args = argparser.parse_args() args = argparser.parse_args()
nacl_root = FindBaseNaCl() nacl_root = FindBaseNaCl()
...@@ -108,10 +108,10 @@ if __name__ == '__main__': ...@@ -108,10 +108,10 @@ if __name__ == '__main__':
'--target=' + args.target, '--target=' + args.target,
'--prefix=' + args.prefix, '--prefix=' + args.prefix,
'-allow-uninitialized-globals', '-allow-uninitialized-globals',
'-o=' + (obj_sz if args.elf else asm_sz), '-filetype=' + args.filetype,
bitcode] + '-o=' + (obj_sz if args.filetype == 'obj' else asm_sz),
(['-elf-writer'] if args.elf else [])) bitcode])
if not args.elf: if args.filetype != 'obj':
shellcmd(['llvm-mc', shellcmd(['llvm-mc',
'-arch=' + arch_map[args.target], '-arch=' + arch_map[args.target],
'-filetype=obj', '-filetype=obj',
......
...@@ -211,7 +211,7 @@ static cl::opt<uint32_t> NumThreads( ...@@ -211,7 +211,7 @@ static cl::opt<uint32_t> NumThreads(
cl::desc("Number of translation threads (0 for purely sequential)"), cl::desc("Number of translation threads (0 for purely sequential)"),
// TODO(stichnot): Settle on a good default. Consider // TODO(stichnot): Settle on a good default. Consider
// something related to std::thread::hardware_concurrency(). // something related to std::thread::hardware_concurrency().
cl::init(0)); cl::init(2));
static int GetReturnValue(int Val) { static int GetReturnValue(int Val) {
if (AlwaysExitSuccess) if (AlwaysExitSuccess)
......
...@@ -262,5 +262,5 @@ define void @func() { ...@@ -262,5 +262,5 @@ define void @func() {
ret void ret void
} }
; CHECK: define void @func() { ; DUMP: define void @func() {
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