[PATCH] D147964: [VPlan] Introduce new entry block to VPlan for early SCEV expansion.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 06:43:04 PDT 2023
Ayal added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3261
+ [ ] <-- old preheader - loop iteration number check and SCEVs in Plan's
+ / | preheader are expanded here. Eventually all required SCEV
+ / | expansion should happen here.
----------------
(post-commit nit): so have we reached this "Eventually" situation?
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:1139-1140
else {
- VPBasicBlock *Preheader = Plan.getEntry();
Expanded = new VPExpandSCEVRecipe(Expr, SE);
- Preheader->appendRecipe(Expanded->getDefiningRecipe());
+ Plan.getPreheader()->appendRecipe(Expanded->getDefiningRecipe());
}
----------------
fhahn wrote:
> Ayal wrote:
> > fhahn wrote:
> > > Ayal wrote:
> > > > nit: can cast instead of getting defined recipe.
> > > Will address separately.
> > All ExpandSCEVRecipes are placed in preheader, rather than vector preheader / entry, right?
> Yep!
(post-commit nit): worth updating documented figure, see above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147964/new/
https://reviews.llvm.org/D147964
More information about the llvm-commits
mailing list