[PATCH] D25963: [LoopUnroll] Implement profile-based loop peeling

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 00:14:07 PST 2016


anemet added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:111-112
+
+/// \brief Clones the body of the loop L, putting it between \p InsertTop and \p
+/// InsertBot.
+/// \param IterNumber The serial number of the iteration currently being
----------------
You should also say something about adjusting profile data otherwise it's not clear why all the other parameters are passed.  

Does that actually need to happen in this same function?  It feels that this could be further decomposed for improved readability.


================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:224-226
+bool llvm::peelLoop(Loop *L, unsigned PeelCount, LoopInfo *LI,
+                    ScalarEvolution *SE, DominatorTree *DT,
+                    bool PreserveLCSSA) {
----------------
Missing function comment.


================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:293
+  InsertBot->setName(Header->getName() + ".peel.next");
+  NewPreHeader->setName(PreHeader->getName() + ".new");
+
----------------
.peel.new


https://reviews.llvm.org/D25963





More information about the llvm-commits mailing list