[PATCH] D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 11:43:22 PDT 2017


dberlin added a comment.

This looks reasonable at a glance, note it is likely to be subtly broken in some cases until https://reviews.llvm.org/D35381 goes in.
I've added a few coments, i'll take a deeper look in a little bit.



================
Comment at: lib/Transforms/Scalar/GVNHoist.cpp:751
+        DEBUG(for (auto B : IDFBlocks) dbgs() << "\nPDF: " << B->getName(););
+        // continue; // Cannot find a unique common-dom-frontier for set of VNs.
+      }
----------------
What are you really trying to do here? (IE why is the continue commented out)


================
Comment at: lib/Transforms/Scalar/GVNHoist.cpp:954
           MemoryAccess *Def = OldMemAcc->getDefiningAccess();
-          NewMemAcc =
-            MSSAUpdater->createMemoryAccessInBB(Repl, Def, HoistPt, MemorySSA::End);
+          NewMemAcc = MSSAUpdater->createMemoryAccessInBB(Repl, Def, HoistPt,
+                                                          MemorySSA::End);
----------------
I think since you wrote this we added moving functions you could use here.



https://reviews.llvm.org/D35918





More information about the llvm-commits mailing list