diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-08-25 01:00:36 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-08-25 01:00:36 +0000 |
commit | b8cfe4ff411d92b150ce7ec6ec3568ad187dd517 (patch) | |
tree | 23d64cd3191173d834ee882b738a500a6ff0cbe2 | |
parent | 0f660260e69e9c6cb6662c14abfc67b8d7b39a40 (diff) |
Add a command line option to disable global merge pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138536 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMTargetMachine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index b006b0e263..39552aca00 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -21,6 +21,11 @@ #include "llvm/Target/TargetOptions.h" using namespace llvm; +static cl::opt<bool> +EnableGlobalMerge("global-merge", + cl::desc("Enable global merge pass"), + cl::init(true)); + extern "C" void LLVMInitializeARMTarget() { // Register the target. RegisterTargetMachine<ARMTargetMachine> X(TheARMTarget); @@ -83,7 +88,7 @@ ThumbTargetMachine::ThumbTargetMachine(const Target &T, StringRef TT, bool ARMBaseTargetMachine::addPreISel(PassManagerBase &PM, CodeGenOpt::Level OptLevel) { - if (OptLevel != CodeGenOpt::None) + if (OptLevel != CodeGenOpt::None && EnableGlobalMerge) PM.add(createARMGlobalMergePass(getTargetLowering())); return false; |