Skip to content

Commit c728842

Browse files
committed
[SLP][NFC]Fix naming of variables/functions, NFC.
1 parent 87d884b commit c728842

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,8 @@ static bool allSameType(ArrayRef<Value *> VL) {
791791

792792
/// \returns True if in-tree use also needs extract. This refers to
793793
/// possible scalar operand in vectorized instruction.
794-
static bool InTreeUserNeedToExtract(Value *Scalar, Instruction *UserInst,
795-
TargetLibraryInfo *TLI) {
794+
static bool doesInTreeUserNeedToExtract(Value *Scalar, Instruction *UserInst,
795+
TargetLibraryInfo *TLI) {
796796
unsigned Opcode = UserInst->getOpcode();
797797
switch (Opcode) {
798798
case Instruction::Load: {
@@ -3663,7 +3663,7 @@ template <> struct GraphTraits<BoUpSLP *> {
36633663
template <> struct DOTGraphTraits<BoUpSLP *> : public DefaultDOTGraphTraits {
36643664
using TreeEntry = BoUpSLP::TreeEntry;
36653665

3666-
DOTGraphTraits(bool isSimple = false) : DefaultDOTGraphTraits(isSimple) {}
3666+
DOTGraphTraits(bool IsSimple = false) : DefaultDOTGraphTraits(IsSimple) {}
36673667

36683668
std::string getNodeLabel(const TreeEntry *Entry, const BoUpSLP *R) {
36693669
std::string Str;
@@ -4947,7 +4947,7 @@ void BoUpSLP::buildExternalUses(
49474947
if (UseScalar != U ||
49484948
UseEntry->State == TreeEntry::ScatterVectorize ||
49494949
UseEntry->State == TreeEntry::PossibleStridedVectorize ||
4950-
!InTreeUserNeedToExtract(Scalar, UserInst, TLI)) {
4950+
!doesInTreeUserNeedToExtract(Scalar, UserInst, TLI)) {
49514951
LLVM_DEBUG(dbgs() << "SLP: \tInternal user will be removed:" << *U
49524952
<< ".\n");
49534953
assert(UseEntry->State != TreeEntry::NeedToGather && "Bad state");
@@ -12763,7 +12763,7 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
1276312763
}
1276412764
}
1276512765

12766-
auto makeControlDependent = [&](Instruction *I) {
12766+
auto MakeControlDependent = [&](Instruction *I) {
1276712767
auto *DepDest = getScheduleData(I);
1276812768
assert(DepDest && "must be in schedule window");
1276912769
DepDest->ControlDependencies.push_back(BundleMember);
@@ -12785,7 +12785,7 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
1278512785
continue;
1278612786

1278712787
// Add the dependency
12788-
makeControlDependent(I);
12788+
MakeControlDependent(I);
1278912789

1279012790
if (!isGuaranteedToTransferExecutionToSuccessor(I))
1279112791
// Everything past here must be control dependent on I.
@@ -12811,7 +12811,7 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
1281112811
continue;
1281212812

1281312813
// Add the dependency
12814-
makeControlDependent(I);
12814+
MakeControlDependent(I);
1281512815
}
1281612816
}
1281712817

@@ -12829,7 +12829,7 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
1282912829
continue;
1283012830

1283112831
// Add the dependency
12832-
makeControlDependent(I);
12832+
MakeControlDependent(I);
1283312833
break;
1283412834
}
1283512835
}
@@ -12844,7 +12844,7 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
1284412844
"NextLoadStore list for non memory effecting bundle?");
1284512845
MemoryLocation SrcLoc = getLocation(SrcInst);
1284612846
bool SrcMayWrite = BundleMember->Inst->mayWriteToMemory();
12847-
unsigned numAliased = 0;
12847+
unsigned NumAliased = 0;
1284812848
unsigned DistToSrc = 1;
1284912849

1285012850
for (; DepDest; DepDest = DepDest->NextLoadStore) {
@@ -12859,13 +12859,13 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
1285912859
// check this limit even between two read-only instructions.
1286012860
if (DistToSrc >= MaxMemDepDistance ||
1286112861
((SrcMayWrite || DepDest->Inst->mayWriteToMemory()) &&
12862-
(numAliased >= AliasedCheckLimit ||
12862+
(NumAliased >= AliasedCheckLimit ||
1286312863
SLP->isAliased(SrcLoc, SrcInst, DepDest->Inst)))) {
1286412864

1286512865
// We increment the counter only if the locations are aliased
1286612866
// (instead of counting all alias checks). This gives a better
1286712867
// balance between reduced runtime and accurate dependencies.
12868-
numAliased++;
12868+
NumAliased++;
1286912869

1287012870
DepDest->MemoryDependencies.push_back(BundleMember);
1287112871
BundleMember->Dependencies++;
@@ -12967,20 +12967,20 @@ void BoUpSLP::scheduleBlock(BlockScheduling *BS) {
1296712967

1296812968
// Do the "real" scheduling.
1296912969
while (!ReadyInsts.empty()) {
12970-
ScheduleData *picked = *ReadyInsts.begin();
12970+
ScheduleData *Picked = *ReadyInsts.begin();
1297112971
ReadyInsts.erase(ReadyInsts.begin());
1297212972

1297312973
// Move the scheduled instruction(s) to their dedicated places, if not
1297412974
// there yet.
12975-
for (ScheduleData *BundleMember = picked; BundleMember;
12975+
for (ScheduleData *BundleMember = Picked; BundleMember;
1297612976
BundleMember = BundleMember->NextInBundle) {
12977-
Instruction *pickedInst = BundleMember->Inst;
12978-
if (pickedInst->getNextNode() != LastScheduledInst)
12979-
pickedInst->moveBefore(LastScheduledInst);
12980-
LastScheduledInst = pickedInst;
12977+
Instruction *PickedInst = BundleMember->Inst;
12978+
if (PickedInst->getNextNode() != LastScheduledInst)
12979+
PickedInst->moveBefore(LastScheduledInst);
12980+
LastScheduledInst = PickedInst;
1298112981
}
1298212982

12983-
BS->schedule(picked, ReadyInsts);
12983+
BS->schedule(Picked, ReadyInsts);
1298412984
}
1298512985

1298612986
// Check that we didn't break any of our invariants.
@@ -13695,8 +13695,8 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
1369513695
// NOTE: the following will give user internal llvm type name, which may
1369613696
// not be useful.
1369713697
R.getORE()->emit([&]() {
13698-
std::string type_str;
13699-
llvm::raw_string_ostream rso(type_str);
13698+
std::string TypeStr;
13699+
llvm::raw_string_ostream rso(TypeStr);
1370013700
Ty->print(rso);
1370113701
return OptimizationRemarkMissed(SV_NAME, "UnsupportedType", I0)
1370213702
<< "Cannot SLP vectorize list: type "

0 commit comments

Comments
 (0)