]> granicus.if.org Git - llvm/commit
[LoopInfo] Add helper methods to compute two useful orderings of the
authorChandler Carruth <chandlerc@gmail.com>
Fri, 20 Jan 2017 02:41:20 +0000 (02:41 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 20 Jan 2017 02:41:20 +0000 (02:41 +0000)
commit50679291930555e6561130ab5311bb4545dbd922
tree8697654aafa2b686d5d4802771c5f28134830da4
parent41b2c9b1f5900b00ca111fb7094adaf847df3fd6
[LoopInfo] Add helper methods to compute two useful orderings of the
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
include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/LoopInfoImpl.h
lib/Analysis/LoopAnalysisManager.cpp
unittests/Analysis/LoopInfoTest.cpp