Johnson, Nicholas Paul via llvm-dev
2018-Mar-22 15:20 UTC
[llvm-dev] TargetOpcode::KILL confusion
Hello, Could someone please explain the semantics of TargetOpcode::KILL? Specifically, in this example, which register is killed? Would it be legal for operands 0 and 1 to refer to different registers? 128B %R3<def> = KILL %R3, %R3_1<imp-use>, %R3_23<imp-use> (In my out-of-tree target, %R3 is a <4xi32> register, %R3_1 is an i32 sub-register of %R3, and %R3_23 is a <2xi32> sub-register of %R3). Thanks, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180322/0267f9a4/attachment.html>
KILL is usually just a placeholder for an operation that has been removed. We keep it around not to have to update some data structure. Its “semantic” is similar to a nop but unlike nops they won’t generate any code. Typically, KILL instructions are created out of identity copies or instructions with only dead defs.> On Mar 22, 2018, at 8:20 AM, Johnson, Nicholas Paul via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > Could someone please explain the semantics of TargetOpcode::KILL? Specifically, in this example, which register is killed? Would it be legal for operands 0 and 1 to refer to different registers? > > 128B %R3<def> = KILL %R3, %R3_1<imp-use>, %R3_23<imp-use> > > (In my out-of-tree target, %R3 is a <4xi32> register, %R3_1 is an i32 sub-register of %R3, and %R3_23 is a <2xi32> sub-register of %R3). > > Thanks, > Nick > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180322/c2672691/attachment.html>
Apparently Analagous Threads
- [LLVMdev] How to define complicated instruction in TableGen (Direct3D shader instruction)
- [LLVMdev] How to define complicated instruction in TableGen (Direct3D shader instruction)
- [LLVMdev] getNodePriority()
- [LLVMdev] minor patch to fix 'random` tblgen -gen-inst-enums-bug
- [LLVMdev] Problem in TwoAddressInstructionPass::runOnMachineFunction regarding subRegs