Skip to content
  • Chandler Carruth's avatar
    [LoopInfo] Add helper methods to compute two useful orderings of the · 50679291
    Chandler Carruth authored
    loops in a function.
    
    These are relatively confusing to talk about and compute correctly so it
    seems really good to write down their implementation in one place. I've
    replaced one place we needed this in the loop PM infrastructure and
    I have another place in a pending patch that wants it.
    
    We can't quite use this for the core loop PM walk because there we're
    sometimes working on a sub-forest.
    
    I'll add the expected unittests before committing this but wanted to
    make sure folks were happy with these names / comments.
    
    Credit goes to Richard Smith for the idea for naming the order where siblings
    are in reverse program order but the tree traversal remains preorder.
    
    Differential Revision: https://reviews.llvm.org/D28932
    
    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292569 91177308-0d34-0410-b5e6-96231b3b80d8
    50679291