<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 2:50 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: echristo<br>
Date: Wed Oct  8 04:50:52 2014<br>
New Revision: 219291<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=219291&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=219291&view=rev</a><br>
Log:<br>
Grab the TargetRegisterInfo off of the subtarget from the<br>
MachineFunction rather than a lookup on the TargetMachine<br>
to avoid unnecessary lookups.<br></blockquote><div><br></div><div>Huh - has MachineFunction 'always' had a getSubtarget, or is that something you added recently?<br><br>(just 'huh' in the sense that it's convenient, but presumably llvm::Function doesn't/can't offer this convenience (layering, etc))</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=219291&r1=219290&r2=219291&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=219291&r1=219290&r2=219291&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Oct  8 04:50:52 2014<br>
@@ -454,7 +454,7 @@ bool SelectionDAGISel::runOnMachineFunct<br>
   // copied into vregs, emit the copies into the top of the block before<br>
   // emitting the code for the block.<br>
   MachineBasicBlock *EntryMBB = MF->begin();<br>
-  const TargetRegisterInfo &TRI = *TM.getSubtargetImpl()->getRegisterInfo();<br>
+  const TargetRegisterInfo &TRI = *MF->getSubtarget().getRegisterInfo();<br>
   RegInfo->EmitLiveInCopies(EntryMBB, TRI, *TII);<br>
<br>
   DenseMap<unsigned, unsigned> LiveInMap;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>