summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-lto/llvm-lto.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-09-15 23:05:59 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-09-15 23:05:59 +0000
commitcff5feff6fd6e18e73b97de41f9aa5da23ceee95 (patch)
tree33ceb04978a9c105fba18d6d4a3b9056c0f91330 /llvm/tools/llvm-lto/llvm-lto.cpp
parentc1603b64937c90f6b4515fe84f5f3c8779b56925 (diff)
downloadbcm5719-llvm-cff5feff6fd6e18e73b97de41f9aa5da23ceee95.tar.gz
bcm5719-llvm-cff5feff6fd6e18e73b97de41f9aa5da23ceee95.zip
Reapply "LTO: Disable extra verify runs in release builds"
This reverts commit r247730, effectively reapplying r247729. This time I have an lld commit ready to follow. llvm-svn: 247735
Diffstat (limited to 'llvm/tools/llvm-lto/llvm-lto.cpp')
-rw-r--r--llvm/tools/llvm-lto/llvm-lto.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index cdb1bcaa6bc..50680ccb8ab 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -36,6 +36,10 @@ OptLevel("O",
cl::ZeroOrMore,
cl::init('2'));
+static cl::opt<bool> DisableVerify(
+ "disable-verify", cl::init(false),
+ cl::desc("Do not run the verifier during the optimization pipeline"));
+
static cl::opt<bool>
DisableInline("disable-inlining", cl::init(false),
cl::desc("Do not run the inliner pass"));
@@ -248,7 +252,7 @@ int main(int argc, char **argv) {
if (!OutputFilename.empty()) {
std::string ErrorInfo;
- if (!CodeGen.optimize(DisableInline, DisableGVNLoadPRE,
+ if (!CodeGen.optimize(DisableVerify, DisableInline, DisableGVNLoadPRE,
DisableLTOVectorization, ErrorInfo)) {
errs() << argv[0] << ": error optimizing the code: " << ErrorInfo << "\n";
return 1;
@@ -285,7 +289,7 @@ int main(int argc, char **argv) {
std::string ErrorInfo;
const char *OutputName = nullptr;
- if (!CodeGen.compile_to_file(&OutputName, DisableInline,
+ if (!CodeGen.compile_to_file(&OutputName, DisableVerify, DisableInline,
DisableGVNLoadPRE, DisableLTOVectorization,
ErrorInfo)) {
errs() << argv[0]
OpenPOWER on IntegriCloud