Skip to content

Commit bb3d789

Browse files
committed
[SLP][NFC]Improve dump of the ScheduleData, NFC
1 parent e526819 commit bb3d789

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3997,23 +3997,29 @@ class BoUpSLP {
39973997
return Sum;
39983998
}
39993999

4000-
void dump(raw_ostream &os) const {
4001-
if (!isSchedulingEntity()) {
4002-
os << "/ " << *Inst;
4003-
} else if (NextInBundle) {
4004-
os << '[' << *Inst;
4000+
void dump(raw_ostream &OS) const {
4001+
if (isPartOfBundle()) {
4002+
if (!isSchedulingEntity()) {
4003+
OS << "/ " << *Inst << ", part of ";
4004+
FirstInBundle->dump(OS);
4005+
return;
4006+
}
4007+
OS << '[' << *Inst;
40054008
ScheduleData *SD = NextInBundle;
40064009
while (SD) {
4007-
os << ';' << *SD->Inst;
4010+
OS << ';' << *SD->Inst;
40084011
SD = SD->NextInBundle;
40094012
}
4010-
os << ']';
4013+
OS << ']';
40114014
} else {
4012-
os << *Inst;
4015+
OS << *Inst;
40134016
}
40144017
}
40154018

4016-
LLVM_DUMP_METHOD void dump() const { dump(dbgs()); }
4019+
LLVM_DUMP_METHOD void dump() const {
4020+
dump(dbgs());
4021+
dbgs() << '\n';
4022+
}
40174023

40184024
Instruction *Inst = nullptr;
40194025

0 commit comments

Comments
 (0)