[PATCH] D31843: [LCSSA] Try to not walk the dominator tree more than necessary

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 18:30:24 PDT 2017


On Wed, Apr 12, 2017 at 6:18 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> For and exit block to be immediately dominated by something outside the
> loop, it implies not all paths from that dominator, to the exit block, go
> through the loop.
> Loop simplify claims to transform all loops for that to not be true (IE that
> all loop exits are dominated by the header)
> If we allow lcssa for non-loopsimplify'd loops, then the following would
> suffice:
>
>
>      | --- A
>      |      |
>      |      B<-
>      |      |    |
>      |--->C --
>             |
>            D
>
> C is the loop exit block, and it is immediately dominated by A.
>

Yes, I think we came up with a similar example independently :)


More information about the llvm-commits mailing list