mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 03:30:28 +00:00
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
This commit is contained in:
parent
0f660260e6
commit
b8cfe4ff41
@ -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
Block a user