[llvm] [VPlan] Add initial VPScalarEvolution, use to get trip count SCEV (NFC) (PR #94464)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 21 04:19:36 PDT 2024


================
@@ -67,6 +69,15 @@ class VPTypeAnalysis {
 // Collect a VPlan's ephemeral recipes (those used only by an assume).
 void collectEphemeralRecipesForVPlan(VPlan &Plan,
                                      DenseSet<VPRecipeBase *> &EphRecipes);
+
+namespace vputils {
+
+/// Return the SCEV expression for \p V. Returns SCEVCouldNotCompute if no
+/// SCEV expression could be constructed.
+const SCEV *getSCEVExprForVPValue(VPValue *V, ScalarEvolution &SE);
----------------
fhahn wrote:

`VPlan.h` has grown quite a bit by now, so I think it would possibly make sense to split things up by functionality a bit (same for VPlan.cpp). it doesn't necessarily have to go into `VPlanAnalysis.cpp` but could be moved into a separate VPlanUtils.h as an alternative.

https://github.com/llvm/llvm-project/pull/94464


More information about the llvm-commits mailing list