[llvm-commits] [patch] Convert uses of getPhysicalRegisterRegClass in VirtRegRewriter.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Jul 11 09:02:55 PDT 2010


On Jul 11, 2010, at 8:56 AM, Rafael Espindola wrote:

> The first one was used just to call isSafeToMoveRegClassDefs. In
> general, using a more specific reg class is better, in practice only
> x86 implements that method and the results are always the same.

Yes.

> The second one is in FindFreeRegister and is used to check if a
> register is in a register class, a much more direct call to contains
> is better as  it should cover more cases and is faster.

Yep, ancient code.

Looks good to me. Please commit

Your other patch removing the virtual specifier on getPhysicalRegisterRegClass is also OK to commit now, but you might just want to go ahead and remove the method entirely instead.


-------------- 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/20100711/16c20e7e/attachment.bin>


More information about the llvm-commits mailing list