Skip to content

Commit 412b278

Browse files
committed
!fixup address latest comments, thanks!
1 parent 5c37c32 commit 412b278

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9374,9 +9374,7 @@ static void addScalarResumePhis(VPRecipeBuilder &Builder, VPlan &Plan,
93749374
}
93759375

93769376
// Collect VPIRInstructions for phis in the exit block from the latch only.
9377-
static SetVector<VPIRInstruction *>
9378-
collectUsersInLatchExitBlock(Loop *OrigLoop, VPRecipeBuilder &Builder,
9379-
VPlan &Plan) {
9377+
static SetVector<VPIRInstruction *> collectUsersInLatchExitBlock(VPlan &Plan) {
93809378
SetVector<VPIRInstruction *> ExitUsersToFix;
93819379
for (VPIRBasicBlock *ExitVPBB : Plan.getExitBlocks()) {
93829380
// Nothing to do for unreachable exit blocks.
@@ -9763,7 +9761,7 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
97639761
DenseMap<VPValue *, VPValue *> IVEndValues;
97649762
addScalarResumePhis(RecipeBuilder, *Plan, IVEndValues);
97659763
SetVector<VPIRInstruction *> ExitUsersToFix =
9766-
collectUsersInLatchExitBlock(OrigLoop, RecipeBuilder, *Plan);
9764+
collectUsersInLatchExitBlock(*Plan);
97679765
addExitUsersForFirstOrderRecurrences(*Plan, ExitUsersToFix);
97689766
addUsersInExitBlocks(*Plan, ExitUsersToFix);
97699767

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,9 @@ std::unique_ptr<VPlan> PlainCFGBuilder::buildPlainCFG(
354354

355355
// Fix VPlan loop-closed-ssa exit phi's by adding incoming operands to the
356356
// VPIRInstructions wrapping them.
357-
// Note that the operand order may need adjusting when predecessors are added,
358-
// if an exit block has multiple predecessor.
357+
// // Note that the operand order corresponds to IR predecessor order, and may
358+
// need adjusting when VPlan predecessors are added, if an exit block has
359+
// multiple predecessor.
359360
for (auto *EB : Plan->getExitBlocks()) {
360361
for (VPRecipeBase &R : EB->phis()) {
361362
auto *PhiR = cast<VPIRPhi>(&R);

0 commit comments

Comments
 (0)