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

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 14:46:33 PDT 2016


danielcdh added inline comments.

================
Comment at: lib/Transforms/Scalar/LoopSink.cpp:142
@@ +141,3 @@
+          !L->contains(LI->getLoopFor(UI->getParent()))) {
+        BBs.clear();
+        break;
----------------
That would become general purpose sinking instead of loop-sinking. And we need to handle alias/invariant differently.

================
Comment at: lib/Transforms/Scalar/LoopSink.cpp:179
@@ +178,3 @@
+      if (!L->contains(LI->getLoopFor(SinkBB))) {
+        ShouldSkip = true;
+        break;
----------------
good catch. Thanks!


https://reviews.llvm.org/D22778





More information about the llvm-commits mailing list