[PATCH] D32200: [LV] Refactor ILV.vectorize[Loop]() by introducing LVP.executePlan()

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 02:39:23 PDT 2017


rengolin added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:394
 
-  // Perform the actual loop widening (vectorization).
-  void vectorize() {
-    // Create a new empty loop. Unlink the old loop and connect the new one.
-    createEmptyLoop();
-    // Widen each instruction in the old loop to a new one in the new loop.
-    vectorizeLoop();
-  }
+  /// Create a new empty loop. Unlink the old loop and connect the new one.
+  void createVectorizedLoop();
----------------
Ayal wrote:
> rengolin wrote:
> > This also vectorises, no? This comment implies it just replaces with an empty loop.
> Ahh, no, it creates an empty loop into which vector code will subsequently be inserted (by calls to vectorizeInstruction()), and introduces its scalar induction variable of step VF*UF. It also creates all the surrounding blocks, branches, etc.. This was the exact original behavior of the method, and its original comment. This patch only exposes it publicly, to be (re)used for generating code by vplan.
> 
> Perhaps a better yet name for it may be createVectorizedLoopSkeleton(). Can we agree on this, or other welcomed suggestions?
Right, I see. I'm ok with whatever name that reflects that this is just the new empty loop. Not all TAB-completion bring the comments above the function. :)


https://reviews.llvm.org/D32200





More information about the llvm-commits mailing list