[PATCH] D36224: [TwoAddressInstructionPass] Replace subregister uses when processing tied operands

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 13:05:52 PDT 2018


1) Without subreg liveness enables the register allocator doesn't even have a notion about subregs, it can ignore the subreg annotations for the most part. Because of this the only natural interpration of the flags is when they apply to the full virtual register.

2) Here's an example of why a lanemask would be necessary for proper modeling:

%0 = somedef ...                  # dead definition of sub0 and sub1 but sub2+sub3 are not dead.
       = use %0.sub2_sub3    # last use/kill of sub2 but not sub3
       = use %0.sub3

- Matthias

> On Sep 27, 2018, at 12:36 PM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:
> 
> On 9/27/2018 11:50 AM, Matthias Braun via Phabricator wrote:
>> No! dead, killed and undef are specifically not about the subregister part but about the full vreg. (In an ideal world for subregister liveness we would have a lanemask for dead,killed,undef instead of just the bit we have today. With only a bit available we mostly ignore them for subreg liveness purposes as we cannot express situations like a write with only some lanes dead anyway...)
> 
> I was the one doing the "telling" if I remember correctly.
> 
> When it comes to verification, why would there be any reason to treat dead and kill flags as applying to the full vreg when they are specified on a subreg?  We don't need lane masks for that, since the subreg relationship is sufficient.
> 
> -Krzysztof
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> hosted by The Linux Foundation



More information about the llvm-commits mailing list