diff options
| author | Teresa Johnson <tejohnson@google.com> | 2015-09-16 18:06:45 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2015-09-16 18:06:45 +0000 |
| commit | 8c8fe5a0159041e176e3331e7fc0d3031ebefe16 (patch) | |
| tree | 3c78b2a76b5bfa140f02fbf1dfa568ff8eeaf465 /llvm/tools | |
| parent | 62c01ff9ca64015fc4b4bfc236174099be3f85f9 (diff) | |
| download | bcm5719-llvm-8c8fe5a0159041e176e3331e7fc0d3031ebefe16.tar.gz bcm5719-llvm-8c8fe5a0159041e176e3331e7fc0d3031ebefe16.zip | |
Disable the second verification run when performing LTO through
gold in NDEBUG mode.
Follow on patch for r247729 - LTO: Disable extra verify runs in release
builds.
llvm-svn: 247824
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index a917ecfa502..14c42671b0d 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -94,6 +94,11 @@ namespace options { static OutputType TheOutputType = OT_NORMAL; static unsigned OptLevel = 2; static unsigned Parallelism = 1; +#ifdef NDEBUG + static bool DisableVerify = true; +#else + static bool DisableVerify = false; +#endif static std::string obj_path; static std::string extra_library_path; static std::string triple; @@ -134,6 +139,8 @@ namespace options { } else if (opt.startswith("jobs=")) { if (StringRef(opt_ + 5).getAsInteger(10, Parallelism)) message(LDPL_FATAL, "Invalid parallelism level: %s", opt_ + 5); + } else if (opt == "disable-verify") { + DisableVerify = true; } else { // Save this option to pass to the code generator. // ParseCommandLineOptions() expects argv[0] to be program name. Lazily @@ -730,8 +737,10 @@ static void runLTOPasses(Module &M, TargetMachine &TM) { PassManagerBuilder PMB; PMB.LibraryInfo = new TargetLibraryInfoImpl(Triple(TM.getTargetTriple())); PMB.Inliner = createFunctionInliningPass(); + // Unconditionally verify input since it is not verified before this + // point and has unknown origin. PMB.VerifyInput = true; - PMB.VerifyOutput = true; + PMB.VerifyOutput = !options::DisableVerify; PMB.LoopVectorize = true; PMB.SLPVectorize = true; PMB.OptLevel = options::OptLevel; |

