[PATCH] D101286: [LAA] Support pointer phis in loop by analyzing each incoming pointer.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 07:43:50 PDT 2021


fhahn added a comment.

In D101286#2751900 <https://reviews.llvm.org/D101286#2751900>, @efriedma wrote:

> In D101286#2751552 <https://reviews.llvm.org/D101286#2751552>, @fhahn wrote:
>
>> In D101286#2749037 <https://reviews.llvm.org/D101286#2749037>, @efriedma wrote:
>>
>>> Do you need to check anything about the CFG before you just grab the PHI operand values?  For example, if there's a loop, you could have a PHI that refers to another PHI in the same basic block, and I suspect that would mess up the analysis.
>>
>> ...
>
> I wasn't commenting specifically in response to the crash report; just a general concern from reading the patch.  Are you confident the issue I'm describing isn't a problem?

Oh right, sorry about that and the delay! I added such a test (phi uses another phi as incoming value in the same block as `store_with_pointer_phi_in_same_bb_use_other_phi`) in D102266 <https://reviews.llvm.org/D102266>. If the incoming value is another phi, then when won't be able to compute the bounds, due to the phi. We could traverse them further to handle more cases, but it should not be an issue for correctness IIUC. Does that make sense?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101286



More information about the llvm-commits mailing list