Skip to content

Commit 3fbf6f8

Browse files
committed
[LV] Remove more references of unrolled parts after 57f5d8f.
Continue to clean up some now stale references of unroll parts and related terminology as pointed out post-commit for 06c3a7d.
1 parent b1e4656 commit 3fbf6f8

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,6 @@ class InnerLoopVectorizer {
538538
/// A small list of PHINodes.
539539
using PhiVector = SmallVector<PHINode *, 4>;
540540

541-
/// A type for scalarized values in the new loop. Each value from the
542-
/// original loop, when scalarized, is represented by UF x VF scalar values
543-
/// in the new unrolled loop, where UF is the unroll factor and VF is the
544-
/// vectorization factor.
545-
using ScalarParts = SmallVector<SmallVector<Value *, 4>, 2>;
546-
547541
/// Set up the values of the IVs correctly when exiting the vector loop.
548542
void fixupIVUsers(PHINode *OrigPhi, const InductionDescriptor &II,
549543
Value *VectorTripCount, Value *EndValue,

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,10 @@ Value *VPTransformState::get(VPValue *Def, bool NeedsScalar) {
333333

334334
// However, if we are vectorizing, we need to construct the vector values.
335335
// If the value is known to be uniform after vectorization, we can just
336-
// broadcast the scalar value corresponding to lane zero for each unroll
337-
// iteration. Otherwise, we construct the vector values using
338-
// insertelement instructions. Since the resulting vectors are stored in
339-
// State, we will only generate the insertelements once.
336+
// broadcast the scalar value corresponding to lane zero. Otherwise, we
337+
// construct the vector values using insertelement instructions. Since the
338+
// resulting vectors are stored in State, we will only generate the
339+
// insertelements once.
340340
Value *VectorValue = nullptr;
341341
if (IsUniform) {
342342
VectorValue = GetBroadcastInstrs(ScalarValue);
@@ -769,15 +769,15 @@ void VPRegionBlock::execute(VPTransformState *State) {
769769

770770
// Enter replicating mode.
771771
State->Instance = VPIteration(0, 0);
772-
assert(!State->VF.isScalable() && "VF is assumed to be non scalable.");
773-
for (unsigned Lane = 0, VF = State->VF.getKnownMinValue(); Lane < VF;
774-
++Lane) {
775-
State->Instance->Lane = VPLane(Lane, VPLane::Kind::First);
776-
// Visit the VPBlocks connected to \p this, starting from it.
777-
for (VPBlockBase *Block : RPOT) {
778-
LLVM_DEBUG(dbgs() << "LV: VPBlock in RPO " << Block->getName() << '\n');
779-
Block->execute(State);
780-
}
772+
assert(!State->VF.isScalable() && "VF is assumed to be non scalable.");
773+
for (unsigned Lane = 0, VF = State->VF.getKnownMinValue(); Lane < VF;
774+
++Lane) {
775+
State->Instance->Lane = VPLane(Lane, VPLane::Kind::First);
776+
// Visit the VPBlocks connected to \p this, starting from it.
777+
for (VPBlockBase *Block : RPOT) {
778+
LLVM_DEBUG(dbgs() << "LV: VPBlock in RPO " << Block->getName() << '\n');
779+
Block->execute(State);
780+
}
781781
}
782782

783783
// Exit replicating mode.

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ struct VPTransformState {
254254
DominatorTree *DT, IRBuilderBase &Builder,
255255
InnerLoopVectorizer *ILV, VPlan *Plan);
256256

257-
/// The chosen Vectorization and Unroll Factors of the loop being vectorized.
257+
/// The chosen Vectorization Factor of the loop being vectorized.
258258
ElementCount VF;
259259

260260
/// Hold the indices to generate specific scalar instructions. Null indicates
@@ -1253,9 +1253,7 @@ class VPInstruction : public VPRecipeWithIRFlags,
12531253
ComputeReductionResult,
12541254
// Takes the VPValue to extract from as first operand and the lane or part
12551255
// to extract as second operand, counting from the end starting with 1 for
1256-
// last. The second operand must be a positive constant and <= VF when
1257-
// extracting from a vector or <= UF when extracting from an unrolled
1258-
// scalar.
1256+
// last. The second operand must be a positive constant and <= VF.
12591257
ExtractFromEnd,
12601258
LogicalAnd, // Non-poison propagating logical And.
12611259
// Add an offset in bytes (second operand) to a base pointer (first

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,9 +2490,7 @@ void VPInterleaveRecipe::execute(VPTransformState &State) {
24902490
// If the group is reverse, adjust the index to refer to the last vector lane
24912491
// instead of the first. We adjust the index from the first vector lane,
24922492
// rather than directly getting the pointer for lane VF - 1, because the
2493-
// pointer operand of the interleaved access is supposed to be uniform. For
2494-
// uniform instructions, we're only required to generate a value for the
2495-
// first vector lane in each unroll iteration.
2493+
// pointer operand of the interleaved access is supposed to be uniform.
24962494
if (Group->isReverse()) {
24972495
Value *RuntimeVF =
24982496
getRuntimeVF(State.Builder, State.Builder.getInt32Ty(), State.VF);

0 commit comments

Comments
 (0)