[PATCH] D75069: [LoopVectorizer] Inloop vector reductions
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 12 07:35:14 PDT 2020
Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.
This looks good to me, thanks! with last couple of nits.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6595
+ // finding the chain of operations that leads from the loop exit value back
+ // to the phi.
+ SmallVector<Instruction *, 4> ReductionOperations =
----------------
nit: "... that leads from the loop exit value back.." - chain is now found top-down.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7358
+ }
+ RecipeBuilder.recordRecipeOf(Phi);
+ }
----------------
nit: can record the recipe of Phi first, just to follow chain order.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7583
+ VPRecipeBase *CompareRecipe =
+ RecipeBuilder.getRecipe(cast<Instruction>(R->getOperand(0)));
+ CompareRecipe->removeFromParent();
----------------
nit: can assert CompareRecipe->getVPRecipeID()
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75069/new/
https://reviews.llvm.org/D75069
More information about the llvm-commits
mailing list