@@ -965,10 +965,10 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
965965
966966// / Try to simplify the recipes in \p Plan. Use \p CanonicalIVTy as type for all
967967// / un-typed live-ins in VPTypeAnalysis.
968- static void simplifyRecipes (VPlan &Plan, Type * CanonicalIVTy) {
968+ static void simplifyRecipes (VPlan &Plan, Type & CanonicalIVTy) {
969969 ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT (
970970 Plan.getEntry ());
971- VPTypeAnalysis TypeInfo (CanonicalIVTy);
971+ VPTypeAnalysis TypeInfo (& CanonicalIVTy);
972972 for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT)) {
973973 for (VPRecipeBase &R : make_early_inc_range (*VPBB)) {
974974 simplifyRecipe (R, TypeInfo);
@@ -1030,7 +1030,7 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
10301030
10311031 VPBlockUtils::connectBlocks (Preheader, Header);
10321032 VPBlockUtils::connectBlocks (ExitingVPBB, Exit);
1033- simplifyRecipes (Plan, CanIVTy);
1033+ simplifyRecipes (Plan, * CanIVTy);
10341034 } else {
10351035 // The vector region contains header phis for which we cannot remove the
10361036 // loop region yet.
@@ -1443,11 +1443,11 @@ void VPlanTransforms::optimize(VPlan &Plan) {
14431443 runPass (removeRedundantCanonicalIVs, Plan);
14441444 runPass (removeRedundantInductionCasts, Plan);
14451445
1446- simplifyRecipes ( Plan, Plan.getCanonicalIV ()->getScalarType ());
1446+ runPass (simplifyRecipes, Plan, * Plan.getCanonicalIV ()->getScalarType ());
14471447 runPass (removeDeadRecipes, Plan);
14481448 runPass (legalizeAndOptimizeInductions, Plan);
14491449 runPass (removeRedundantExpandSCEVRecipes, Plan);
1450- simplifyRecipes ( Plan, Plan.getCanonicalIV ()->getScalarType ());
1450+ runPass (simplifyRecipes, Plan, * Plan.getCanonicalIV ()->getScalarType ());
14511451 runPass (removeDeadRecipes, Plan);
14521452
14531453 runPass (createAndOptimizeReplicateRegions, Plan);
0 commit comments