forked from OSchip/llvm-project
Add a command line option to disable global merge pass.
llvm-svn: 138536
This commit is contained in:
parent
5be8a4d104
commit
f066b2fe99
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue