[PATCH] D22378: Make processInstruction from LCSSA.cpp externally available.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 15:25:25 PDT 2016


chandlerc added a comment.

Should the declaration for this go into LCSSA.h instead of into LoopUtils.h?


================
Comment at: include/llvm/Transforms/Utils/LoopUtils.h:326
@@ -325,1 +325,3 @@
 
+/// \brief Ensures LCSSA form for instruction Inst in the scope of loop L.
+///
----------------
No need for '\brief'.

================
Comment at: include/llvm/Transforms/Utils/LoopUtils.h:332-334
@@ +331,5 @@
+///
+/// LoopInfo and DominatorTree are required and preserved.
+/// ExitBlocks is a vector containing exit blocks of the loop L.
+/// PredCache should be a valid PredIteratorCache object.
+///
----------------
They aren't just preserved. The CFG isn't mutated, and it might be useful to explicitly call that out.

================
Comment at: lib/Transforms/Utils/LCSSA.cpp:191-194
@@ -189,6 +190,6 @@
 
     // Recurse and re-process each PHI instruction. FIXME: we should really
     // convert this entire thing to a worklist approach where we process a
     // vector of instructions...
-    processInstruction(*OtherLoop, *I, DT, EBs, PredCache, LI);
+    formLCSSAForInstruction(*OtherLoop, *I, DT, LI, EBs, PredCache);
   }
----------------
At least for the one caller of this here, fixing this FIXME would also eliminate the need for the exit blocks and pred cache parameters. Would it eliminate the need for them in the other call sites you have in mind?


https://reviews.llvm.org/D22378





More information about the llvm-commits mailing list