Get rid of some GLOBAL_ISEL ifdefs that should be harmless for code size.

More to come, but those were easy.

llvm-svn: 260723
This commit is contained in:
Quentin Colombet 2016-02-12 20:41:24 +00:00
parent 01674939b2
commit 232f447782
2 changed files with 3 additions and 10 deletions

View File

@ -216,11 +216,9 @@ public:
return true;
}
#ifdef LLVM_BUILD_GLOBAL_ISEL
/// This method should install an IR translator pass, which converts from
/// LLVM code to machine instructions with possibly generic opcodes.
virtual bool addIRTranslator() { return true; }
#endif
/// Add the complete, standard set of LLVM CodeGen passes.
/// Fully developed targets will not generally override this.

View File

@ -42,11 +42,9 @@ static cl::opt<cl::boolOrDefault>
EnableFastISelOption("fast-isel", cl::Hidden,
cl::desc("Enable the \"fast\" instruction selector"));
#ifdef LLVM_BUILD_GLOBAL_ISEL
static cl::opt<bool>
EnableGlobalISel("global-isel", cl::Hidden, cl::init(false),
cl::desc("Enable the \"global\" instruction selector"));
#endif
void LLVMTargetMachine::initAsmInfo() {
MRI = TheTarget.createMCRegInfo(getTargetTriple().str());
@ -141,14 +139,11 @@ addPassesToGenerateCode(LLVMTargetMachine *TM, PassManagerBase &PM,
TM->getO0WantsFastISel()))
TM->setFastISel(true);
#ifdef LLVM_BUILD_GLOBAL_ISEL
if (EnableGlobalISel) {
// Ask the target for an isel.
if (LLVM_UNLIKELY(EnableGlobalISel)) {
if (PassConfig->addIRTranslator())
return nullptr;
} else
#endif
// Ask the target for an isel.
if (PassConfig->addInstSelector())
} else if (PassConfig->addInstSelector())
return nullptr;
PassConfig->addMachinePasses();