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__':
'from the same bitcode as the subzero object. ' +
'If 0, then compile it straight from source.' +
' Default %(default)d.')
argparser.add_argument('--elf', dest='elf',
action='store_true',
help='Directly generate ELF output')
argparser.add_argument('--filetype', default='obj', dest='filetype',
choices=['obj', 'asm', 'iasm'],
help='Output file type. Default %(default)s.')
args = argparser.parse_args()
nacl_root = FindBaseNaCl()
......@@ -108,10 +108,10 @@ if __name__ == '__main__':
'--target=' + args.target,
'--prefix=' + args.prefix,
'-allow-uninitialized-globals',
'-o=' + (obj_sz if args.elf else asm_sz),
bitcode] +
(['-elf-writer'] if args.elf else []))
if not args.elf:
'-filetype=' + args.filetype,
'-o=' + (obj_sz if args.filetype == 'obj' else asm_sz),
bitcode])
if args.filetype != 'obj':
shellcmd(['llvm-mc',
'-arch=' + arch_map[args.target],
'-filetype=obj',
......
......@@ -211,7 +211,7 @@ static cl::opt<uint32_t> NumThreads(
cl::desc("Number of translation threads (0 for purely sequential)"),
// TODO(stichnot): Settle on a good default. Consider
// something related to std::thread::hardware_concurrency().
cl::init(0));
cl::init(2));
static int GetReturnValue(int Val) {
if (AlwaysExitSuccess)
......
......@@ -262,5 +262,5 @@ define void @func() {
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