[PATCH] D147965: [LV] Use VPValue to get expanded value for SCEV step expressions.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 05:29:53 PDT 2023


Ayal added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:418
+  /// Map SCEVs to their expanded values. Populated when executing
+  /// VPExpandSCEVRecipes.
+  DenseMap<const SCEV *, Value *> ExpandedSCEVs;
----------------
fhahn wrote:
> Ayal wrote:
> > Worth defining and passing around, say,
> > `  using SCEV2ValueTy = DenseMap<const SCEV *, Value *>;`
> > instead of the full VPTransformState?
> > 
> > vputils could take care of
> > `  getExpandedSCEV(const SCEV2ValueTy &ExpandedSCEVs, const SCEV *ToExpand);`
> Updated to pass a function_ref to get the expanded SCEV. Just passing the map isn't enough (without more changes to ILV), as we need to also handle expanding constants/SCEVUnknown. 
Passing the map complemented with moving `VPTransformState::getExpandedSCEV(const SCEV*)` to `vputils::getExpandedSCEV(const SCEV2ValueTy&, const SCEV*)` to handle expanding constants/SCEVUnkown?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147965



More information about the llvm-commits mailing list