summaryrefslogtreecommitdiff
path: root/tools/lto/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-04-02 22:16:50 +0000
committerBill Wendling <isanbard@gmail.com>2012-04-02 22:16:50 +0000
commit3197b4453d214aa96de3a42da8f8fe189fff2077 (patch)
tree38a68f4e6bd20272bab5c4ae4eb3b157c8e0271b /tools/lto/LTOCodeGenerator.cpp
parent29f60f359b59032108cdabcde91217b6784c4e13 (diff)
downloadllvm-3197b4453d214aa96de3a42da8f8fe189fff2077.tar.gz
llvm-3197b4453d214aa96de3a42da8f8fe189fff2077.tar.bz2
llvm-3197b4453d214aa96de3a42da8f8fe189fff2077.tar.xz
Add an option to turn off the expensive GVN load PRE part of GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 1d2631e07d..f0640c2206 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -49,6 +49,9 @@ using namespace llvm;
static cl::opt<bool> DisableInline("disable-inlining",
cl::desc("Do not run the inliner pass"));
+static cl::opt<bool> DisableGVNLoadPRE("disable-gvn-loadpre",
+ cl::desc("Do not run the GVN load PRE pass"));
+
const char* LTOCodeGenerator::getVersionString() {
#ifdef LLVM_VERSION_INFO
return PACKAGE_NAME " version " PACKAGE_VERSION ", " LLVM_VERSION_INFO;
@@ -353,7 +356,8 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
passes.add(new TargetData(*_target->getTargetData()));
PassManagerBuilder().populateLTOPassManager(passes, /*Internalize=*/ false,
- !DisableInline);
+ !DisableInline,
+ DisableGVNLoadPRE);
// Make sure everything is still good.
passes.add(createVerifierPass());