@Alive vs. @Use Annotation
Christian Wimmer
christian.wimmer at oracle.com
Wed Sep 11 08:59:54 PDT 2013
On 09/11/2013 08:19 AM, D.Sturm wrote:
> What is the difference between these two? Does @Alive mean I can only write
> the value to a @Def register if that value has already been certainly
> overwritten by a @Use value? (or use it for things like comparisons where I
> don't write to any register?)
Sorry, I cannot really parse this question.
> This would explain why AMD64ControlFlow.CondMoveOp declares trueValue as
> @Alive and falseValue as @Use, but then AMD64ControlFlow.FloatCondMoveOp
> defines both trueValue and falseValue as @Alive although the code is
> otherwise identical to CondMoveOp.
>
> Also this doesn't explain why x and y are @Use in AMD64Compare.CompareOp.
You have to look at the machine code generated for the different compare
operations, so you have to look at the different machine code that is
generated for the operations.
If an input register is still used after an output register is already
written, then clearly these two must be separate registers. This means
that the input is @Alive.
If you don't mind if an input gets the same register as an output, then
the input can be @Use.
-Christian
More information about the graal-dev
mailing list