@@ -809,8 +809,7 @@ class EpilogueVectorizerEpilogueLoop : public InnerLoopAndEpilogueVectorizer {
809
809
};
810
810
} // end namespace llvm
811
811
812
- // / Look for a meaningful debug location on the instruction or it's
813
- // / operands.
812
+ // / Look for a meaningful debug location on the instruction or its operands.
814
813
static DebugLoc getDebugLocFromInstOrOperands (Instruction *I) {
815
814
if (!I)
816
815
return DebugLoc ();
@@ -1798,7 +1797,7 @@ class GeneratedRTChecks {
1798
1797
1799
1798
// / Generate runtime checks in SCEVCheckBlock and MemCheckBlock, so we can
1800
1799
// / accurately estimate the cost of the runtime checks. The blocks are
1801
- // / un-linked from the IR and is added back during vector code generation. If
1800
+ // / un-linked from the IR and are added back during vector code generation. If
1802
1801
// / there is no vector code generation, the check blocks are removed
1803
1802
// / completely.
1804
1803
void create (Loop *L, const LoopAccessInfo &LAI,
@@ -2581,7 +2580,7 @@ PHINode *InnerLoopVectorizer::createInductionResumeValue(
2581
2580
}
2582
2581
}
2583
2582
2584
- // Create phi nodes to merge from the backedge-taken check block.
2583
+ // Create phi nodes to merge from the backedge-taken check block.
2585
2584
PHINode *BCResumeVal =
2586
2585
PHINode::Create (OrigPhi->getType (), 3 , " bc.resume.val" ,
2587
2586
LoopScalarPreHeader->getFirstNonPHIIt ());
@@ -3002,7 +3001,8 @@ void InnerLoopVectorizer::sinkScalarOperands(Instruction *PredInst) {
3002
3001
3003
3002
// We can't sink an instruction if it is a phi node, is not in the loop,
3004
3003
// may have side effects or may read from memory.
3005
- // TODO Could dor more granular checking to allow sinking a load past non-store instructions.
3004
+ // TODO: Could do more granular checking to allow sinking
3005
+ // a load past non-store instructions.
3006
3006
if (!I || isa<PHINode>(I) || !VectorLoop->contains (I) ||
3007
3007
I->mayHaveSideEffects () || I->mayReadFromMemory ())
3008
3008
continue ;
@@ -3140,9 +3140,8 @@ void LoopVectorizationCostModel::collectLoopScalars(ElementCount VF) {
3140
3140
3141
3141
// (2) Add to the worklist all bitcast and getelementptr instructions used by
3142
3142
// memory accesses requiring a scalar use. The pointer operands of loads and
3143
- // stores will be scalar as long as the memory accesses is not a gather or
3144
- // scatter operation. The value operand of a store will remain scalar if the
3145
- // store is scalarized.
3143
+ // stores will be scalar unless the operation is a gather or scatter.
3144
+ // The value operand of a store will remain scalar if the store is scalarized.
3146
3145
for (auto *BB : TheLoop->blocks ())
3147
3146
for (auto &I : *BB) {
3148
3147
if (auto *Load = dyn_cast<LoadInst>(&I)) {
@@ -3415,7 +3414,7 @@ bool LoopVectorizationCostModel::interleavedAccessCanBeWidened(
3415
3414
assert (Group && " Must have a group." );
3416
3415
unsigned InterleaveFactor = Group->getFactor ();
3417
3416
3418
- // If the instruction's allocated size doesn't equal it's type size, it
3417
+ // If the instruction's allocated size doesn't equal its type size, it
3419
3418
// requires padding and will be scalarized.
3420
3419
auto &DL = I->getDataLayout ();
3421
3420
auto *ScalarTy = getLoadStoreType (I);
@@ -3515,11 +3514,11 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
3515
3514
assert (VF.isVector () && !Uniforms.contains (VF) &&
3516
3515
" This function should not be visited twice for the same VF" );
3517
3516
3518
- // Visit the list of Uniforms. If we'll not find any uniform value, we'll
3519
- // not analyze again. Uniforms.count(VF) will return 1.
3517
+ // Visit the list of Uniforms. If we find no uniform value, we won't
3518
+ // analyze again. Uniforms.count(VF) will return 1.
3520
3519
Uniforms[VF].clear ();
3521
3520
3522
- // We now know that the loop is vectorizable!
3521
+ // Now we know that the loop is vectorizable!
3523
3522
// Collect instructions inside the loop that will remain uniform after
3524
3523
// vectorization.
3525
3524
@@ -3566,7 +3565,7 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
3566
3565
3567
3566
auto PrevVF = VF.divideCoefficientBy (2 );
3568
3567
// Return true if all lanes perform the same memory operation, and we can
3569
- // thus chose to execute only one.
3568
+ // thus choose to execute only one.
3570
3569
auto IsUniformMemOpUse = [&](Instruction *I) {
3571
3570
// If the value was already known to not be uniform for the previous
3572
3571
// (smaller VF), it cannot be uniform for the larger VF.
@@ -3957,7 +3956,7 @@ FixedScalableVFPair LoopVectorizationCostModel::computeFeasibleMaxVF(
3957
3956
FixedScalableVFPair
3958
3957
LoopVectorizationCostModel::computeMaxVF (ElementCount UserVF, unsigned UserIC) {
3959
3958
if (Legal->getRuntimePointerChecking ()->Need && TTI.hasBranchDivergence ()) {
3960
- // TODO: It may by useful to do since it's still likely to be dynamically
3959
+ // TODO: It may be useful to do since it's still likely to be dynamically
3961
3960
// uniform if the target can skip.
3962
3961
reportVectorizationFailure (
3963
3962
" Not inserting runtime ptr check for divergent target" ,
@@ -4031,7 +4030,7 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
4031
4030
assert (WideningDecisions.empty () && Uniforms.empty () && Scalars.empty () &&
4032
4031
" No decisions should have been taken at this point" );
4033
4032
// Note: There is no need to invalidate any cost modeling decisions here, as
4034
- // non where taken so far.
4033
+ // none were taken so far.
4035
4034
InterleaveInfo.invalidateGroupsRequiringScalarEpilogue ();
4036
4035
}
4037
4036
@@ -7940,7 +7939,7 @@ EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(
7940
7939
BasicBlock *Bypass, BasicBlock *Insert) {
7941
7940
7942
7941
assert (EPI.TripCount &&
7943
- " Expected trip count to have been safed in the first pass." );
7942
+ " Expected trip count to have been saved in the first pass." );
7944
7943
assert (
7945
7944
(!isa<Instruction>(EPI.TripCount ) ||
7946
7945
DT->dominates (cast<Instruction>(EPI.TripCount )->getParent (), Insert)) &&
0 commit comments