[PATCH] D122096: [VPlan] Expand induction step in VPlan pre-header.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 04:07:29 PDT 2022


fhahn marked 2 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:1760
+  if (auto *E = dyn_cast<SCEVConstant>(Expr)) {
+    Step = Plan.getOrAddExternalDef(E->getValue());
+  } else if (auto *E = dyn_cast<SCEVUnknown>(Expr)) {
----------------
Ayal wrote:
> nit: can return Plan.getOrAddExternalDef(E->getValue()); can eliminate brackets?
Thanks, simplified in the committed version.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:455
+
+void VPlanTransforms::optimizeExpandSCEVRecipes(VPlan &Plan) {
+  DenseMap<const SCEV *, VPValue *> SCEV2VPV;
----------------
Ayal wrote:
> nit: perhaps "eliminateCommonExpandSCEVRecipes()" or "removeRedundantExpandSCEVRecipes()" would be a more descriptive name.
Thanks, updated in the committed version!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122096



More information about the llvm-commits mailing list