From ce40dbcbaa3871671d0bb6d4131e9bbd99061ba7 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 12 Aug 2014 08:00:56 +0000 Subject: 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. llvm-svn: 215432 --- llvm/lib/CodeGen/MachineFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 212928815cb..7b73df0466a 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -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; -- cgit v1.2.3