[llvm] [VPlan] Optimize more IV increment exit users by using a map (PR #147016)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 4 12:47:49 PDT 2025


================
@@ -823,18 +823,24 @@ static VPValue *optimizeEarlyExitInductionUser(VPlan &Plan,
 
 /// Attempts to optimize the induction variable exit values for users in the
 /// exit block coming from the latch in the original scalar loop.
-static VPValue *
-optimizeLatchExitInductionUser(VPlan &Plan, VPTypeAnalysis &TypeInfo,
-                               VPBlockBase *PredVPBB, VPValue *Op,
-                               DenseMap<VPValue *, VPValue *> &EndValues) {
+static VPValue *optimizeLatchExitInductionUser(
+    VPlan &Plan, VPTypeAnalysis &TypeInfo, VPBlockBase *PredVPBB, VPValue *Op,
+    DenseMap<VPValue *, VPValue *> &EndValues,
+    DenseMap<VPValue *, VPWidenInductionRecipe *> MapIVs) {
----------------
alexey-bataev wrote:

Pass by reference

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


More information about the llvm-commits mailing list