[PATCH] D147783: [VPlan] Add stride->constant VPlan mapping at construction.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 08:33:56 PDT 2023


Ayal accepted this revision.
Ayal added a comment.

In D147783#4374690 <https://reviews.llvm.org/D147783#4374690>, @reames wrote:

> LGTM.  I'm not super familiar with VPlan internals through, so you may want to wait for another reviewer.  I'll defer to you on that.

Looks good to me too, ship it!



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9122
+  for (auto [_, Stride] : Legal->getLAI()->getSymbolicStrides()) {
+    auto *StrideV = cast<SCEVUnknown>(Stride)->getValue();
+    auto *ScevStride = cast<SCEVConstant>(PSE.getSCEV(StrideV));
----------------
nit: suggests that getSymbolicStrides() should return SCEVUnknowns.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9129
+  }
+
   // From this point onwards, VPlan-to-VPlan transformations may change the plan
----------------
LGTM!

This is an optimization that relies on Value2VPValue mapping, so placed here as late as possible? Maybe worth adding to comment.

Would be good to outline stuff out of the excessive tryToBuildVPlanWithVPRecipes()...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147783



More information about the llvm-commits mailing list