Have MachineRegisterInfo take and store the MachineFunction it

was created for rather than the TargetMachine since we only
needed the TM for the subtarget and we can get that from the
MF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-08-12 08:00:56 +00:00
parent 392f7d970c
commit 99cd10fe11
3 changed files with 7 additions and 7 deletions

View File

@ -58,7 +58,7 @@ MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM,
: Fn(F), Target(TM), STI(TM.getSubtargetImpl()), Ctx(mmi.getContext()),
MMI(mmi), GMI(gmi) {
if (TM.getSubtargetImpl()->getRegisterInfo())
RegInfo = new (Allocator) MachineRegisterInfo(TM);
RegInfo = new (Allocator) MachineRegisterInfo(this);
else
RegInfo = nullptr;