[LLVMdev] Kill-flag in two-address instruction tied operands
evan.cheng at apple.com
Tue Jul 14 17:43:26 PDT 2009
On Jul 14, 2009, at 12:10 PM, Jakob Stoklund Olesen wrote:
> Two-address instructions are represented as normal three-address
> instructions with a Desc bit that indicates the first two operands are
> tied together. The question is, should the second operand have a
> <kill> flag?
> a: %R0<def> = MUL %R0, %R1<kill>
> b: %R0<def> = MUL %R0<kill>, %R1<kill>
> I think the current policy is a: There should be no kill-flag. The
> machine code verifier has code to handle the missing <kill> flag, and
> the regscavenger asserts if the <kill> flag is set.
> Recently somebody (possibly myself) has been setting <kill> flags on
> my tied use operands, causing regscavenger to assert.
> I just want to verify the policy regarding two-address <kill> flags:
> Case a: <kill> is not allowed. I should add a check to the verifier
> for this. Find out who is setting the flags.
> Case b: <kill> is mandatory. Remove special-case code from verifier,
> fix regscavenger.
> Case c: <kill> is don't care. Fix regscavenger.
> My vote goes to b: Then you don't need special-case code for two-
> address instructions. (Except for places that need special treatment
> of two-address instrs for other reasons).
Two-address operands are being treated differently because they are
indeed different, we are not about to change that.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev