[PATCH] D121623: [LV] Remove unneeded createHeaderBranch.(NFCI)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 02:54:34 PDT 2022


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:634
-  /// vector loop preheader, middle block and scalar preheader. Also
-  /// allocate a loop object for the new vector loop and return it.
-  Loop *createVectorLoopSkeleton(StringRef Prefix);
----------------
Ayal wrote:
> It still also allocates a loop object for the new vector loop, placing the header in it, and could return it, but doing so would be useless - the loop is retrieved when needed from its header block.
Ah yes, added back the bit about allocating the loop, thanks!


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7590
       ILV.createVectorizedLoopSkeleton();
+  State.CFG.LastBB = ILV.LoopMiddleBlock;
   ILV.collectPoisonGeneratingRecipes(State);
----------------
Ayal wrote:
> Would be good to set here the minimal fields of State needed, PrevBB/VectorLoopPreHeader being an anchor, and complement other caching fields later - possibly LastBB included?
I tried to move all revenant initializations here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121623/new/

https://reviews.llvm.org/D121623



More information about the llvm-commits mailing list