summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-19 21:32:03 +0000
committerDan Gohman <gohman@apple.com>2008-11-19 21:32:03 +0000
commit78fb6214f39f2bec2468af7997dc0e43e0ef2188 (patch)
tree430e2cb707c18af2cbfcdca667d2348c9dfd85b9 /llvm/lib
parentdbfc693f475a44045f0eba79eabdf8205ca223a1 (diff)
downloadbcm5719-llvm-78fb6214f39f2bec2468af7997dc0e43e0ef2188.tar.gz
bcm5719-llvm-78fb6214f39f2bec2468af7997dc0e43e0ef2188.zip
Convert SUnit's dump method into a print method and implement
dump in terms of it. llvm-svn: 59665
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index da68cd5029d..b63c3c1cf10 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -18,6 +18,7 @@
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
ScheduleDAG::ScheduleDAG(SelectionDAG *dag, MachineBasicBlock *bb,
@@ -459,22 +460,25 @@ void ScheduleDAG::Run() {
/// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
/// a group of nodes flagged together.
-void SUnit::dump(const ScheduleDAG *G) const {
- cerr << "SU(" << NodeNum << "): ";
+void SUnit::print(raw_ostream &O, const ScheduleDAG *G) const {
+ O << "SU(" << NodeNum << "): ";
if (getNode()) {
SmallVector<SDNode *, 4> FlaggedNodes;
for (SDNode *N = getNode(); N; N = N->getFlaggedNode())
FlaggedNodes.push_back(N);
while (!FlaggedNodes.empty()) {
- cerr << " ";
+ O << " ";
FlaggedNodes.back()->dump(G->DAG);
- cerr << "\n";
+ O << "\n";
FlaggedNodes.pop_back();
}
} else {
- cerr << "CROSS RC COPY ";
+ O << "CROSS RC COPY\n";
}
- cerr << "\n";
+}
+
+void SUnit::dump(const ScheduleDAG *G) const {
+ print(errs(), G);
}
void SUnit::dumpAll(const ScheduleDAG *G) const {
OpenPOWER on IntegriCloud