[llvm] UTC: support debug output from LDist (PR #93208)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 03:52:52 PDT 2024
================
@@ -231,17 +231,16 @@ class InstPartition {
}
}
- void print() const {
- if (DepCycle)
- dbgs() << " (cycle)\n";
+ void print(raw_ostream &OS) const {
+ OS << (DepCycle ? " (cycle)\n" : "\n");
for (auto *I : Set)
// Prefix with the block name.
- dbgs() << " " << I->getParent()->getName() << ":" << *I << "\n";
+ OS << " " << I->getParent()->getName() << ":" << *I << "\n";
}
- void printBlocks() const {
+ void printBlocks(raw_ostream &OS) const {
----------------
artagnon wrote:
The `print()` function on line 530 takes an output stream, so I thought I should change the other `print` function and `printBlocks` to take an output stream as well, for uniformity. Besides, this is also the convention used in other `dump()` functions in the tree.
https://github.com/llvm/llvm-project/pull/93208
More information about the llvm-commits
mailing list