[llvm-commits] [PATCH] Teach -join-cross-class-copies to intersect register classes

Evan Cheng evan.cheng at apple.com
Thu Apr 30 12:32:53 PDT 2009


On Apr 29, 2009, at 1:45 PM, Jakob Stoklund Olesen wrote:

> This patch series teaches -join-register-classes to properly  
> intersect register classes when joining two virtual registers. This  
> avoids generating bad machine code in the blackfin backend. It  
> should have no effect on other targets.
>
> === 01-tablegen-subclass.patch
>
> Loosen TableGen's definition of a register subclass so a subclass is  
> allowed to have a larger spill size. This is consistent with what - 
> join-cross-class-copies does now.

Please add your description as comments to tablegen.

>
> See my ramblings here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-April/021966.html
>
> This patch is not actually necessary to solve my blackfin problems -  
> it ensures that -join-cross-class-copies doesn't change behaviour on  
> Alpha, PPC, SPU, and X86 where a register may have multiple spill  
> sizes.
>
> === 02-intersection-regclass.patch

intersection seems like the wrong name? Perhaps getCommonSubClass? I  
actually dislike the way we use the term "subclass" in this context.  
It seems like we should change it to "subset"?

Otherwise your patches look great!

Thanks,

Evan

>
> Implement the intersection(A, B) function that find the largest  
> common subclass of two register classes.
>
> === 03-join-cross-intersection.patch
>
> Use intersection() to determine the new register class of a joined  
> virtual register.
>
>
>
>
> <01-tablegen-subclass.patch><02-intersection-regclass.patch><03-join- 
> cross- 
> intersection.patch>_______________________________________________
> 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