@@ -996,23 +996,23 @@ class BinOpSameOpcodeHelper {
996
996
bool hasCandidateOpcode(unsigned Opcode) const {
997
997
MaskType Candidate = Mask & SeenBefore;
998
998
switch (Opcode) {
999
- case Instruction::Shl:
1000
- return Candidate & ShlBIT;
1001
- case Instruction::AShr:
1002
- return Candidate & AShrBIT;
1003
- case Instruction::Mul:
1004
- return Candidate & MulBIT;
1005
- case Instruction::Add:
1006
- return Candidate & AddBIT;
1007
- case Instruction::Sub:
1008
- return Candidate & SubBIT;
1009
- case Instruction::And:
1010
- return Candidate & AndBIT;
1011
- case Instruction::Or:
1012
- return Candidate & OrBIT;
1013
- case Instruction::Xor:
1014
- return Candidate & XorBIT;
1015
- default:
999
+ case Instruction::Shl:
1000
+ return Candidate & ShlBIT;
1001
+ case Instruction::AShr:
1002
+ return Candidate & AShrBIT;
1003
+ case Instruction::Mul:
1004
+ return Candidate & MulBIT;
1005
+ case Instruction::Add:
1006
+ return Candidate & AddBIT;
1007
+ case Instruction::Sub:
1008
+ return Candidate & SubBIT;
1009
+ case Instruction::And:
1010
+ return Candidate & AndBIT;
1011
+ case Instruction::Or:
1012
+ return Candidate & OrBIT;
1013
+ case Instruction::Xor:
1014
+ return Candidate & XorBIT;
1015
+ default:
1016
1016
break;
1017
1017
}
1018
1018
llvm_unreachable("Cannot find interchangeable instruction.");
@@ -5052,9 +5052,7 @@ class BoUpSLP {
5052
5052
const ScheduleBundle &getBundle() const { return Bundle; }
5053
5053
5054
5054
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
5055
- void dump(raw_ostream &OS) const {
5056
- OS << "[Copyable]" << *getInst();
5057
- }
5055
+ void dump(raw_ostream &OS) const { OS << "[Copyable]" << *getInst(); }
5058
5056
5059
5057
LLVM_DUMP_METHOD void dump() const {
5060
5058
dump(dbgs());
@@ -5306,13 +5304,16 @@ class BoUpSLP {
5306
5304
.try_emplace(std::make_pair(std::make_pair(In, EI.EdgeIdx), I))
5307
5305
.first->getSecond()
5308
5306
.push_back(CD);
5309
- ScheduleCopyableDataMapByUsers.try_emplace(I).first->getSecond().insert(CD);
5307
+ ScheduleCopyableDataMapByUsers.try_emplace(I)
5308
+ .first->getSecond()
5309
+ .insert(CD);
5310
5310
// Remove extra deps for users, becoming non-immediate users of the
5311
5311
// instruction. It may happen, if the chain of same copyable elements
5312
5312
// appears in the tree.
5313
5313
if (In == I) {
5314
5314
EdgeInfo UserEI = EI.UserTE->UserTreeIndex;
5315
- if (ScheduleCopyableData *UserCD = getScheduleCopyableData(UserEI, In))
5315
+ if (ScheduleCopyableData *UserCD =
5316
+ getScheduleCopyableData(UserEI, In))
5316
5317
ScheduleCopyableDataMapByUsers[I].remove(UserCD);
5317
5318
}
5318
5319
It = find(make_range(std::next(It), Op.end()), I);
@@ -5417,7 +5418,8 @@ class BoUpSLP {
5417
5418
++OperandsUses[I];
5418
5419
}
5419
5420
}
5420
- // Decrement the unscheduled counter and insert to ready list if ready.
5421
+ // Decrement the unscheduled counter and insert to ready list if
5422
+ // ready.
5421
5423
auto DecrUnschedForInst = [&](Instruction *I, TreeEntry *UserTE,
5422
5424
unsigned OpIdx) {
5423
5425
const EdgeInfo EI = {UserTE, OpIdx};
@@ -10709,7 +10711,7 @@ class InstructionsCompatibilityAnalysis {
10709
10711
S = InstructionsState(MainOp, MainOp, /*HasCopyables=*/true);
10710
10712
if (!WithProfitabilityCheck)
10711
10713
return S;
10712
- // Check if it is profitable to vectorize the instruction.
10714
+ // Check if it is profitable to vectorize the instruction.
10713
10715
SmallVector<BoUpSLP::ValueList> Operands = buildOperands(S, VL);
10714
10716
if (VL.size() == 2) {
10715
10717
// Check if the operands allow better vectorization.
0 commit comments