[PATCH] D98627: [BasicAA] Drop dependency on Loop Info. PR43276

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 02:51:47 PDT 2021


mkazantsev added a comment.

In D98627#2628288 <https://reviews.llvm.org/D98627#2628288>, @nikic wrote:

> In D98627#2628283 <https://reviews.llvm.org/D98627#2628283>, @mkazantsev wrote:
>
>> In D98627#2628263 <https://reviews.llvm.org/D98627#2628263>, @nikic wrote:
>>
>>> However, it's not at all obvious to me why this problem affects only LI and not DT. JumpThreading has many other places that use DTU, why do those not have to drop AA as well?
>>
>> All relevant places take DTU, so the DomTree is kept up-to-date (under assumption that AA and the opt inself use the *same* dom tree, which is, frankly, not obvious).
>>
>> I'll see what are the implications of dropping LI dependency in basic AA. Maybe it's indeed a way worth taking.
>
> JumpThreading only uses DTU to preserve the DomTree for the pass manager, it never flushes the DTU during the execution of the pass itself. This means that AA may work on a stale DomTree.

I can't say for sure that there is no another bug. But with LI, the situation is pretty simple: we delete a block (for example, by merging it into its predecessor), which was a loop exit block. Then, an attempt to get loop exits leads to crash.

Interactions with DT may happen to be correct, or may be indeed broken (and we are still to find a test that shows this).


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

https://reviews.llvm.org/D98627



More information about the llvm-commits mailing list