From: Eric Christopher Date: Wed, 8 Oct 2014 09:50:52 +0000 (+0000) Subject: Grab the TargetRegisterInfo off of the subtarget from the X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c586355b060d2ac915d5c06e656671f486976a59;p=oota-llvm.git Grab the TargetRegisterInfo off of the subtarget from the MachineFunction rather than a lookup on the TargetMachine to avoid unnecessary lookups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219291 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 628ea626ee8..006f3e0143a 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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;