[llvm-commits] [patch] Mostly mechanical removal of getPhysicalRegisterRegClass.patch
Jakob Stoklund Olesen
stoklund at 2pi.dk
Sat Jun 12 22:15:14 PDT 2010
On Jun 12, 2010, at 9:57 PM, Rafael Espindola wrote:
>> TLI gets that directly from X86TargetLowering:
>>
>> addRegisterClass(MVT::f80, X86::RFP80RegisterClass);
>>
>> This should not be called after stackification, only during isel. Who calls getRegClassFor() so late?
>>
>>> This and your comment about wanting the largest available class,
>>> suggest that the current function might actually be the correct one in
>>> some places. We should be able to at least make it non virtual.
>>
>>
>> getMaximalPhysRegClass(Reg, VT) is a possibility, but I think TLI.getRegClassFor(VT) fits.
>
> Are you suggesting I should change X86TargetLowering to register RST
> for f80? This will brake the register allocator, no?
No, don't do that.
I am talking about the places where the instruction selector is dealing with a CopyFromReg. It needs to pick a register class for the virtual register, and it currently uses TRI->getPhysicalRegisterRegClass(SrcReg, VT). I am suggesting that TLI.getRegClassFor(VT) is a better fit than getMinimalPhysRegClass() in that case.
You should definitely not be calling TLI.getRegClassFor(VT) after the FP stackifier has run.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100612/d95a50ed/attachment.bin>
More information about the llvm-commits
mailing list