[PATCH] D117796: AMDGPU: Fix LiveVariables error after lowering SI_END_CF

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 14:38:34 PST 2022


arsenm added a comment.

In D117796#3274477 <https://reviews.llvm.org/D117796#3274477>, @ruiling wrote:

> In D117796#3274453 <https://reviews.llvm.org/D117796#3274453>, @arsenm wrote:
>
>> In D117796#3274452 <https://reviews.llvm.org/D117796#3274452>, @ruiling wrote:
>>
>>> I would hope we can move the block split logic into a separate pass that can be scheduled before we constructing liveness information, like during addPreRegAlloc(). It is expensive to update either LiveVariables or LiveIntervals. Sounds good?
>>
>> The whole reason this pass is here is because it needs to be done after phi elimination, so you can't really move it anywhere else. LiveVariables we should also just be pushing to eliminate entirely
>
> I think block split itself could be done before phi elimination. If you detect the source operand of SI_END_CF defined in the same block, you can split the block. That works just like what we are doing now. Did I miss something?

The reason we are splitting the block is so we can place the exec modification before the copies for lowered phis. We cannot split the block as needed while the phis still exist since phis need to be the first instructions in the block


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117796/new/

https://reviews.llvm.org/D117796



More information about the llvm-commits mailing list