@@ -965,10 +965,10 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
965
965
966
966
// / Try to simplify the recipes in \p Plan. Use \p CanonicalIVTy as type for all
967
967
// / un-typed live-ins in VPTypeAnalysis.
968
- static void simplifyRecipes (VPlan &Plan, Type * CanonicalIVTy) {
968
+ static void simplifyRecipes (VPlan &Plan, Type & CanonicalIVTy) {
969
969
ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT (
970
970
Plan.getEntry ());
971
- VPTypeAnalysis TypeInfo (CanonicalIVTy);
971
+ VPTypeAnalysis TypeInfo (& CanonicalIVTy);
972
972
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT)) {
973
973
for (VPRecipeBase &R : make_early_inc_range (*VPBB)) {
974
974
simplifyRecipe (R, TypeInfo);
@@ -1030,7 +1030,7 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
1030
1030
1031
1031
VPBlockUtils::connectBlocks (Preheader, Header);
1032
1032
VPBlockUtils::connectBlocks (ExitingVPBB, Exit);
1033
- simplifyRecipes (Plan, CanIVTy);
1033
+ simplifyRecipes (Plan, * CanIVTy);
1034
1034
} else {
1035
1035
// The vector region contains header phis for which we cannot remove the
1036
1036
// loop region yet.
@@ -1443,11 +1443,11 @@ void VPlanTransforms::optimize(VPlan &Plan) {
1443
1443
runPass (removeRedundantCanonicalIVs, Plan);
1444
1444
runPass (removeRedundantInductionCasts, Plan);
1445
1445
1446
- simplifyRecipes ( Plan, Plan.getCanonicalIV ()->getScalarType ());
1446
+ runPass (simplifyRecipes, Plan, * Plan.getCanonicalIV ()->getScalarType ());
1447
1447
runPass (removeDeadRecipes, Plan);
1448
1448
runPass (legalizeAndOptimizeInductions, Plan);
1449
1449
runPass (removeRedundantExpandSCEVRecipes, Plan);
1450
- simplifyRecipes ( Plan, Plan.getCanonicalIV ()->getScalarType ());
1450
+ runPass (simplifyRecipes, Plan, * Plan.getCanonicalIV ()->getScalarType ());
1451
1451
runPass (removeDeadRecipes, Plan);
1452
1452
1453
1453
runPass (createAndOptimizeReplicateRegions, Plan);
0 commit comments