Jakob Stoklund Olesen
2009-Jul-14 19:10 UTC
[LLVMdev] Kill-flag in two-address instruction tied operands
Hi, 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). /jakob
Evan Cheng
2009-Jul-15 00:43 UTC
[LLVMdev] Kill-flag in two-address instruction tied operands
On Jul 14, 2009, at 12:10 PM, Jakob Stoklund Olesen wrote:> Hi, > > 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. TheRight.> 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.It's 'a'.> > 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. Evan> > /jakob > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Jakob Stoklund Olesen
2009-Jul-15 00:50 UTC
[LLVMdev] Kill-flag in two-address instruction tied operands
On 15/07/2009, at 02.43, Evan Cheng wrote:>> 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. > > It's 'a'.Thanks, I'll add a check to the verifier so it barfs on kill flags. Currently it implements c: Don't care. /jakob
Apparently Analagous Threads
- [LLVMdev] Kill-flag in two-address instruction tied operands
- [LLVMdev] Possible bug in the ARM backend?
- [LLVMdev] Def/Kill flags for subregisters
- [LLVMdev] [PATCH] Handle tied sub-operands in AsmMatcherEmitter
- [LLVMdev] [PATCH] Handle tied sub-operands in AsmMatcherEmitter