[PATCH] D28932: [LoopInfo] Add helper methods to compute two useful orderings of the loops in a function.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 18:24:38 PST 2017


davide added a comment.

I like the idea (and the names), some obvious comments inline. Given these two functions are almost identical modulo the `reverse()`, maybe use a common helper? Not feeling strong tho, so, up to you.



================
Comment at: include/llvm/Analysis/LoopInfoImpl.h:511-512
+template <class BlockT, class LoopT>
+void LoopInfoBase<BlockT, LoopT>::getLoopsInPreorder() {
+  SmallVector<LoopT *, 4> PreOrderLoops, PreOrderWorklist;
+  // The outer-most loop actually goes into the result in the same relative
----------------
Does this actually build (I'm probably missing something here)?


https://reviews.llvm.org/D28932





More information about the llvm-commits mailing list