diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index 57b644026db..fc03da1a8da 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -88,19 +88,14 @@ bool ARMTargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) { return false; } -bool ARMTargetMachine::addPostRegAlloc(FunctionPassManager &PM, bool Fast) { - if (Fast || !EnableIfConversion || Subtarget.isThumb()) - return false; - - PM.add(createIfConverterPass()); - return true; -} - bool ARMTargetMachine::addPreEmitPass(FunctionPassManager &PM, bool Fast) { // FIXME: temporarily disabling load / store optimization pass for Thumb mode. if (!Fast && !DisableLdStOpti && !Subtarget.isThumb()) PM.add(createARMLoadStoreOptimizationPass()); + if (!Fast && EnableIfConversion && !Subtarget.isThumb()) + PM.add(createIfConverterPass()); + PM.add(createARMConstantIslandPass()); return true; } diff --git a/lib/Target/ARM/ARMTargetMachine.h b/lib/Target/ARM/ARMTargetMachine.h index dcdd1285f54..a50275c675f 100644 --- a/lib/Target/ARM/ARMTargetMachine.h +++ b/lib/Target/ARM/ARMTargetMachine.h @@ -53,7 +53,6 @@ public: // Pass Pipeline Configuration virtual bool addInstSelector(FunctionPassManager &PM, bool Fast); - virtual bool addPostRegAlloc(FunctionPassManager &PM, bool Fast); virtual bool addPreEmitPass(FunctionPassManager &PM, bool Fast); virtual bool addAssemblyEmitter(FunctionPassManager &PM, bool Fast, std::ostream &Out);