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

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 21 07:28:59 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);
----------------
ayalz wrote:

Ok, +1 to reorganize all `vputils` functions in files of their own.

Most of these would presumably promote to a type system of VPValues, or other refinements like introducing an extract-first-lane as only user to capture `onlyFirstLaneUsed()`.

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


More information about the llvm-commits mailing list