From d2670a34c9767a614bce2a9c25c92d9e8be0e35e Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 8 Oct 2014 09:50:52 +0000 Subject: [PATCH] Grab the TargetRegisterInfo off of the subtarget from the MachineFunction rather than a lookup on the TargetMachine to avoid unnecessary lookups. llvm-svn: 219291 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 628ea626ee89..006f3e0143a5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -454,7 +454,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { // copied into vregs, emit the copies into the top of the block before // emitting the code for the block. MachineBasicBlock *EntryMBB = MF->begin(); - const TargetRegisterInfo &TRI = *TM.getSubtargetImpl()->getRegisterInfo(); + const TargetRegisterInfo &TRI = *MF->getSubtarget().getRegisterInfo(); RegInfo->EmitLiveInCopies(EntryMBB, TRI, *TII); DenseMap LiveInMap;