[PATCH] D22437: [LoopDist] Port to new PM

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 16 19:48:59 PDT 2016


silvas added inline comments.

================
Comment at: lib/Transforms/Scalar/LoopDistribute.cpp:962
@@ +961,3 @@
+
+  for (Loop *TopLevelLoop : LI)
+    for (Loop *L : depth_first(TopLevelLoop))
----------------
anemet wrote:
> silvas wrote:
> > Usually we have been factoring out a "runImpl" to be shared by the old PM and the new PM. Is that doable here to avoid some of the duplication?
> Yeah, I saw that in the LoopVectorizer and it should be doable.  I decided against it because there is only a little duplication since ultimately they both delegate to the LoopDistributeForLoop class.  And when the old PM code goes away the runImpl thing would feel awkward.
> 
> But I am happy to make the change if you feel strongly about it.  And thanks for the reviews!
Generally I would prefer for the old and new PM to share as much code as possible to avoid (by design) any divergence. It's not clear how long until the old code gets deleted.


https://reviews.llvm.org/D22437





More information about the llvm-commits mailing list