[llvm-commits] [PATCH] Don't -join-cross-class-copies of physical and virtual registers
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Apr 24 00:19:07 CDT 2009
On 23/04/2009, at 22.40, Evan Cheng wrote:
> Unfortunately your patch will disable some of the functionalities for
> X86. See the comments:
> // This is not an insert_subreg but it looks like one.
> // e.g. %reg1024:4 = MOV32rr %EAX
> That means reg1024 is a 64-bit register. EAX is not in the register
> class but we want to coalesce this by assigning RAX to reg1024.
I don't know how I managed to overlook that. Thanks.
It seems there are two orthogonal issues here. One is the use of
subreg operands, the other is register classes. Both can be relevant
at the same time. For instance
> %reg1024:4 = MOV32rr %ESI
would be illegal to coalesce if %reg1024 is GR64_. The subregister
%reg1024:4 has class GR32_, and %ESI is not in that class.
With the current check in differingRegisterClasses, could this be
%reg1024:1 = MOV8rr %reg1025:2
If both registers are GR16_, differingRegisterClasses returns false.
> Can you find another solution?
Yes. I will have another go. I think the issue of subreg operands and
that of regclasses should be handled separately.
More information about the llvm-commits