[llvm-commits] [patch] Mostly mechanical removal of getPhysicalRegisterRegClass.patch
Rafael Espindola
espindola at google.com
Mon Jun 28 20:15:36 PDT 2010
> 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.
The other changes that were needed
*) Update the ARM copyRegToReg to handle SPR_8
*) 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.
> /jakob
>
Cheers,
--
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: copy.patch
Type: text/x-patch
Size: 6749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100628/c0abca00/attachment.bin>
More information about the llvm-commits
mailing list