diff options
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 9ed61c6685b..e5678ba5585 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -15,7 +15,6 @@ #include "llvm/Analysis/Passes.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/BasicTTIImpl.h" -#include "llvm/CodeGen/MachineFunctionAnalysis.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/TargetPassConfig.h" @@ -103,19 +102,15 @@ TargetIRAnalysis LLVMTargetMachine::getTargetIRAnalysis() { } MachineModuleInfo & -LLVMTargetMachine::addMachineModuleInfo(PassManagerBase &PM) const { - MachineModuleInfo *MMI = new MachineModuleInfo(*getMCAsmInfo(), +LLVMTargetMachine::addMachineModuleInfo(PassManagerBase &PM, + MachineFunctionInitializer *MFI) const { + MachineModuleInfo *MMI = new MachineModuleInfo(*this, *getMCAsmInfo(), *getMCRegisterInfo(), - getObjFileLowering()); + getObjFileLowering(), MFI); PM.add(MMI); return *MMI; } -void LLVMTargetMachine::addMachineFunctionAnalysis(PassManagerBase &PM, - MachineFunctionInitializer *MFInitializer) const { - PM.add(new MachineFunctionAnalysis(*this, MFInitializer)); -} - /// addPassesToX helper drives creation and initialization of TargetPassConfig. static MCContext * addPassesToGenerateCode(LLVMTargetMachine *TM, PassManagerBase &PM, @@ -150,8 +145,7 @@ addPassesToGenerateCode(LLVMTargetMachine *TM, PassManagerBase &PM, PassConfig->addISelPrepare(); - MachineModuleInfo &MMI = TM->addMachineModuleInfo(PM); - TM->addMachineFunctionAnalysis(PM, MFInitializer); + MachineModuleInfo &MMI = TM->addMachineModuleInfo(PM, MFInitializer); // Enable FastISel with -fast, but allow that to be overridden. TM->setO0WantsFastISel(EnableFastISelOption != cl::BOU_FALSE); |