[llvm-commits] [PATCH] Prevent illegal joins of physical and virtual registers

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Apr 26 08:21:07 PDT 2009


This is my second attempt at verifying register classes when  
coalescing physical and virtual registers. The first attempt  
completely missed the issue of subregisters being joined.

I have attached two patches:

targetregclass.patch: Change the static function  
getSubRegisterRegClass in ScheduleDagSDNodesEmit.cpp to a method on  
TargetRegisterClass. The method is needed by the next patch.

coalesce-phys-virt.patch: Verify register classes when joining  
physical and virtual registers. This time take into account all the  
weird subreg combinations that are possible.

Please note that this patch causes a number of failures in the CodeGen/ 
X86 test suite. That is because X86RegisterInfo.td contains  
inconsistent information about subregister classes. I am submitting a  
patch to the X86 backend that fixes this.

With the X86 patch, this patch passes "make check".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: coalesce-phys-virt.patch
Type: application/octet-stream
Size: 3639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090426/409ac9e3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: targetregclass-subreg.patch
Type: application/octet-stream
Size: 3340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090426/409ac9e3/attachment-0001.obj>


More information about the llvm-commits mailing list