From 337262068f8daa54a8558980d7780a069b8846c2 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 27 Jan 2015 08:48:42 +0000 Subject: Replace some uses of getSubtargetImpl with the cached version off of the MachineFunction or with the version that takes a Function reference as an argument. llvm-svn: 227185 --- llvm/lib/CodeGen/MachineFunction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 186b151de30..937cf03a294 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -600,8 +600,7 @@ MachineFrameInfo::getPristineRegs(const MachineBasicBlock *MBB) const { assert(MBB && "MBB must be valid"); const MachineFunction *MF = MBB->getParent(); assert(MF && "MBB must be part of a MachineFunction"); - const TargetMachine &TM = MF->getTarget(); - const TargetRegisterInfo *TRI = TM.getSubtargetImpl()->getRegisterInfo(); + const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo(); BitVector BV(TRI->getNumRegs()); // Before CSI is calculated, no registers are considered pristine. They can be -- cgit v1.2.3