[PATCH] D88183: [LoopInfo] Clarify header-loop relationship

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 12:00:00 PDT 2020


Meinersbur added a comment.

There are different definitions of loops. In the literature, such as a Dragon Book, a loop is identified by a backedge, but LLVM does it with its header. But only natural loops have a header: that is, not all cyclic control flow is represented by LoopInfo. Cyclic control flow that is is not form a natural loop is called irreducible control flow.

Anyway, using SCCs to stand for loops is bad as well since it ignores subloops. It should be a induced subgraph, not component. I think I raised this in the first review, but it was committed anyway. I'd be grateful if this could be cleaned up.

Would you be ok if I made another patch trying to fix all these things?


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

https://reviews.llvm.org/D88183



More information about the llvm-commits mailing list