forked from OSchip/llvm-project
[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.
This commit is contained in:
parent
c0d4f2282d
commit
b18141a8f2
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue