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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 03:04:28 PDT 2022


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7590
       ILV.createVectorizedLoopSkeleton();
+  State.CFG.LastBB = ILV.LoopMiddleBlock;
   ILV.collectPoisonGeneratingRecipes(State);
----------------
Ayal wrote:
> fhahn wrote:
> > 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.
> Oh, no, sorry ... I meant LVP should (continue to) set the minimal amount of fields in State here, and let VPlan complement whatever additional fields it needs later, as done now. Wanted to make sure if ExitBB needs to be set to middleBlock here, instead of setting it later to L->getExitBlock() in VPlan::execute() as done now, say because the creation of L is to be moved to later?
> Oh, no, sorry ... I meant LVP should (continue to) set the minimal amount of fields in State here,

Ah right that makes sense. I updated the patch to only set VectorPreHeader here and set the other fields in `VPlan::execute` based on that.


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