Skip to content

Commit

Permalink
Add a command line option to disable global merge pass.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138536 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Evan Cheng committed Aug 25, 2011
1 parent 0f66026 commit b8cfe4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Target/ARM/ARMTargetMachine.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b8cfe4f

Please sign in to comment.