[PATCH] D44595: Restructuring LoopRotation.cpp to create Loop Rotation Pass with Loop Rotation Utility Interface

Jin Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 07:52:26 PDT 2018


jinlin added inline comments.


================
Comment at: llvm/trunk/include/llvm/Transforms/Utils/LoopRotationUtils.h:31
+                  DominatorTree *DT, ScalarEvolution *SE,
+                  const SimplifyQuery &SQ);
+
----------------
efriedma wrote:
> This seems like a bad API for a utility.  It doesn't really rotate a loop; it implements the entire loop rotation pass.  It performs multiple different transforms, some of which don't actually rotate the loop.  And there are a bunch of profitability heuristics which aren't under the control of this API.  Overall, the caller doesn't really know what will happen to the loop.  I don't understand how anyone could use this API to do anything useful besides implement the -loop-rotate pass.
I will prepare another change set to address the issues you pointed out. 


Repository:
  rL LLVM

https://reviews.llvm.org/D44595





More information about the llvm-commits mailing list