[llvm] b18141a - [VPlan] Set VFs included in plan before last set of VPTransforms (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 01:17:17 PDT 2022
Author: Florian Hahn
Date: 2022-06-24T10:16:56+02:00
New Revision: b18141a8f29f638be0602aa6ffbfc2d434b0b74a
URL: https://github.com/llvm/llvm-project/commit/b18141a8f29f638be0602aa6ffbfc2d434b0b74a
DIFF: https://github.com/llvm/llvm-project/commit/b18141a8f29f638be0602aa6ffbfc2d434b0b74a.diff
LOG: [VPlan] Set VFs included in plan before last set of VPTransforms (NFC).
This allows VPlanTransforms to query the VFs included in the plan in the
future.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 4119c62041938..ccdc17fe3e87a 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -9000,16 +9000,6 @@ VPlanPtr LoopVectorizationPlanner::buildVPlanWithVPRecipes(
}
}
- // From this point onwards, VPlan-to-VPlan transformations may change the plan
- // in ways that accessing values using original IR values is incorrect.
- Plan->disableValue2VPValue();
-
- VPlanTransforms::optimizeInductions(*Plan, *PSE.getSE());
- VPlanTransforms::sinkScalarOperands(*Plan);
- VPlanTransforms::mergeReplicateRegions(*Plan);
- VPlanTransforms::removeDeadRecipes(*Plan);
- VPlanTransforms::removeRedundantExpandSCEVRecipes(*Plan);
-
std::string PlanName;
raw_string_ostream RSO(PlanName);
ElementCount VF = Range.Start;
@@ -9023,6 +9013,16 @@ VPlanPtr LoopVectorizationPlanner::buildVPlanWithVPRecipes(
RSO.flush();
Plan->setName(PlanName);
+ // From this point onwards, VPlan-to-VPlan transformations may change the plan
+ // in ways that accessing values using original IR values is incorrect.
+ Plan->disableValue2VPValue();
+
+ VPlanTransforms::optimizeInductions(*Plan, *PSE.getSE());
+ VPlanTransforms::sinkScalarOperands(*Plan);
+ VPlanTransforms::mergeReplicateRegions(*Plan);
+ VPlanTransforms::removeDeadRecipes(*Plan);
+ VPlanTransforms::removeRedundantExpandSCEVRecipes(*Plan);
+
// Fold Exit block into its predecessor if possible.
// TODO: Fold block earlier once all VPlan transforms properly maintain a
// VPBasicBlock as exit.
More information about the llvm-commits
mailing list