[llvm-commits] [patch] Mostly mechanical removal of getPhysicalRegisterRegClass.patch
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Jun 28 20:26:26 PDT 2010
On Jun 28, 2010, at 8:15 PM, Rafael Espindola wrote:
>> I think I was confused.
>>
>> I have taken a closer look at InstrEmitter.cpp now. In EmitCopyFromReg(), getPhysicalRegisterRegClass() is only used to provide an argument for copyRegToReg(), and TLI->getRegClassFor(VT) is already used to create the virtual register.
>>
>> That is fine as is. It is safe to replace getPhysicalRegisterRegClass with getMinimalPhysRegClass there.
>>
>> The same goes for the uses in ScheduleDAG*.cpp
>
> Sorry it took me so long to reply. Was "lost" in other areas.
>
> The attached patch adds a VT argument to getMinimalPhysRegClass and
> replaces the copy related uses of getPhysicalRegisterRegClass with it.
> The argument being that if we want to make a copy (or estimate its
> cost), it is better to use the smallest class as more efficient
> operations might be possible.
Looks good.
> The other changes that were needed
> *) Update the ARM copyRegToReg to handle SPR_8
Yup.
> *) Update an ARM test, since we now produce a neon move instead of a
> vfp move. This is because the optimization:
>
> else if (DestRC == ARM::DPR_VFP2RegisterClass ||
> SrcRC == ARM::DPR_VFP2RegisterClass)
> // Always use neon reg-reg move if source or dest is NEON-only regclass.
> Opc = ARM::VMOVDneon;
>
> is now used.
This is a little worrying, but probably not your fault.
Maybe the NEONMoveFix pass doesn't work properly for such a small function?
/jakob
-------------- 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/20100628/6fe9020e/attachment.bin>
More information about the llvm-commits
mailing list