Commit 51596d43 by Jim Stichnoth

Subzero: Auto-set -build-on-read=0 for .ll input files.

This is purely for convenience of personal testing/debugging. To demonstrate its correctness in this CL, -build-on-read=0 is removed from the two .ll lit tests that explicitly use it, and also from the crosstest.py script. The lit test wrapper run-llvm2ice.py is left unchanged to be safe. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/732583002
parent 33c80641
......@@ -105,7 +105,6 @@ if __name__ == '__main__':
'--target=' + args.target,
'--prefix=' + args.prefix,
'-allow-uninitialized-globals',
'-build-on-read=0',
'-o=' + asm_sz,
bitcode])
shellcmd(['llvm-mc',
......
......@@ -284,6 +284,13 @@ int main(int argc, char **argv) {
Flags.TranslateOnly = TranslateOnly;
Flags.DisableIRGeneration = DisableIRGeneration;
// Force -build-on-read=0 for .ll files.
const std::string LLSuffix = ".ll";
if (IRFilename.length() >= LLSuffix.length() &&
IRFilename.compare(IRFilename.length() - LLSuffix.length(),
LLSuffix.length(), LLSuffix) == 0)
BuildOnRead = false;
Ice::GlobalContext Ctx(Ls, Os, VMask, TargetArch, OptLevel, TestPrefix,
Flags);
......
......@@ -2,8 +2,7 @@
; errors when malformed. Note: We can only test literal indexing since
; llvm-as will not allow other bad forms of these instructions.
; RUN: llvm-as < %s | pnacl-freeze \
; RUN: | not %llvm2ice -notranslate -build-on-read \
; RUN: llvm-as < %s | pnacl-freeze | not %llvm2ice -notranslate \
; RUN: -allow-pnacl-reader-error-recovery | FileCheck %s
define void @ExtractV4xi1(<4 x i1> %v, i32 %i) {
......
......@@ -4,7 +4,7 @@
; currently because run-llvm2ice.py raises exception on error,
; and output is lost.
; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
; RUN: | not %llvm2ice -notranslate -verbose=inst -build-on-read \
; RUN: | not %llvm2ice -notranslate -verbose=inst \
; RUN: -allow-pnacl-reader-error-recovery \
; RUN: -allow-local-symbol-tables \
; RUN: | FileCheck %s
......
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