[PATCH] D79037: [StructurizeCFG] Fix region nodes ordering

Ehud Katz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 04:29:17 PDT 2020


ekatz added a comment.

In D79037#2024574 <https://reviews.llvm.org/D79037#2024574>, @sameerds wrote:

> Actually, I take that back. Consider the following CFG:
>
> A -> H1, H2
>  H1->B, C
>  B->H1
>  C->B, H2
>  H2->E
>  E->H2, F
> 
>  A is the entry and F is the exit. The loops (H1, B, C) and (H2, E) are siblings with backedges B->H1 and E->H2 respectively. C is an exiting block in the first loop that branches to H2. One POT would be "B, F, E, H2, C, H1, A". When iterating in reverse, the loop with H1 is started first, but H2 from the second loop is encountered before the first loop is completed. 


In this case, those loops are in different regions, and as this is a region pass, they won't appear in the same POT.


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

https://reviews.llvm.org/D79037





More information about the llvm-commits mailing list