[llvm-dev] TargetOpcode::KILL confusion

via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 22 10:13:57 PDT 2018


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>


More information about the llvm-dev mailing list