[llvm] r219291 - Grab the TargetRegisterInfo off of the subtarget from the
Eric Christopher
echristo at gmail.com
Wed Oct 8 12:51:47 PDT 2014
On Wed, Oct 8, 2014 at 8:38 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
> On Wed, Oct 8, 2014 at 2:50 AM, Eric Christopher <echristo at gmail.com> wrote:
>>
>> Author: echristo
>> Date: Wed Oct 8 04:50:52 2014
>> New Revision: 219291
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=219291&view=rev
>> Log:
>> Grab the TargetRegisterInfo off of the subtarget from the
>> MachineFunction rather than a lookup on the TargetMachine
>> to avoid unnecessary lookups.
>
>
> Huh - has MachineFunction 'always' had a getSubtarget, or is that something
> you added recently?
>
For a bit, but yeah, added it fairly recently.
> (just 'huh' in the sense that it's convenient, but presumably llvm::Function
> doesn't/can't offer this convenience (layering, etc))
>
Sadly correct.
-eric
>>
>>
>> Modified:
>> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=219291&r1=219290&r2=219291&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Oct 8
>> 04:50:52 2014
>> @@ -454,7 +454,7 @@ bool SelectionDAGISel::runOnMachineFunct
>> // 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<unsigned, unsigned> LiveInMap;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
More information about the llvm-commits
mailing list