Skip to content

Commit

Permalink
[SLP][NFC]Improve dump of the ScheduleData, NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-bataev authored and joaosaffran committed Feb 14, 2025
1 parent 5531453 commit 5bc3cb4
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3997,23 +3997,29 @@ class BoUpSLP {
return Sum;
}

void dump(raw_ostream &os) const {
if (!isSchedulingEntity()) {
os << "/ " << *Inst;
} else if (NextInBundle) {
os << '[' << *Inst;
void dump(raw_ostream &OS) const {
if (isPartOfBundle()) {
if (!isSchedulingEntity()) {
OS << "/ " << *Inst << ", part of ";
FirstInBundle->dump(OS);
return;
}
OS << '[' << *Inst;
ScheduleData *SD = NextInBundle;
while (SD) {
os << ';' << *SD->Inst;
OS << ';' << *SD->Inst;
SD = SD->NextInBundle;
}
os << ']';
OS << ']';
} else {
os << *Inst;
OS << *Inst;
}
}

LLVM_DUMP_METHOD void dump() const { dump(dbgs()); }
LLVM_DUMP_METHOD void dump() const {
dump(dbgs());
dbgs() << '\n';
}

Instruction *Inst = nullptr;

Expand Down

0 comments on commit 5bc3cb4

Please sign in to comment.