[PATCH] D22778: Add Loop Sink pass to reverse the LICM based of basic block frequency.

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 21 19:55:34 PDT 2016


reames added a subscriber: reames.
reames added a comment.

minor drive by comments


================
Comment at: include/llvm/Transforms/Scalar.h:141
@@ -140,1 +140,3 @@
 
+Pass *createLoopSinkPass();
+
----------------
Missing comments

================
Comment at: include/llvm/Transforms/Utils/Local.h:325
@@ -324,2 +324,3 @@
 /// the end of the given BasicBlock. Returns the number of replacements made.
+/// Replace use in BB if IncludeSelf is true.
 unsigned replaceDominatedUsesWith(Value *From, Value *To, DominatorTree &DT,
----------------
Clarification needed.  This doesn't really tell me what the parameter does.  In fact, there's nothing that says what the BB param is for either.  Can you fix that?

================
Comment at: lib/Transforms/Scalar/LoopSink.cpp:10
@@ +9,3 @@
+//
+// This pass traverses all instructions in loop preheader and sink it to the
+// loop body where frequency is lower than the loop's preheader.
----------------
How does this related to the existing Sink.cpp pass?  (Not asking for an answer in review, but updating the comment with context might be helpful.)


https://reviews.llvm.org/D22778





More information about the llvm-commits mailing list