[llvm-commits] [patch] Intruction Constraint DestReg!=SrcReg (for review)

Chris Lattner clattner at apple.com
Fri Jan 26 12:29:48 PST 2007


On Jan 26, 2007, at 6:09 AM, Lauro Ramos Venancio wrote:
>> 1. I think rather than adding a constraint that says a source operand
>> must not be assigned the same register as another. It would be better
>> if you add a constraint that says a source operand "can be killed at
>> issue cycle + n". The live range analysis current assumes every
>> source operand read is completed at issue cycle + 0 and write back
>> happens at issue cycle + 2. By changing the read latency to 2 you can
>> force a source operand to conflict with a destination operand.
>
> Currently, kill moment of a temporary is determined by the last use of
> it. With the constraint proposed by you, an intermediary use could
> determine kill moment of a temporary. For example, in an use (with
> read latency 5) of a temporary followed by other use of it (with read
> latency 0), the kill moment would be determined by first use. This
> would complicate liveness algorithm. Does any backend need this
> constraint?
>
> Maybe, it would be better a constraint that changes the kill moment
> from default (can kill at issue cycle + 0) to "can kill after
> instruction execution". What do you think?

I don't have any useful technical input to provide, but this feature  
is quite similar to the GCC "&" early-clobber constraint modifier:

http://gcc.gnu.org/onlinedocs/gcc/Modifiers.html#Modifiers

It would be nice if the facility we end up with is at least as  
general as it is.

-Chris



More information about the llvm-commits mailing list