aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSched/SchedGraph.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-27 00:03:19 +0000
committerChris Lattner <sabre@nondot.org>2001-11-27 00:03:19 +0000
commitcee8f9ae67104576b2028125b56e9ba4856a1d66 (patch)
treec09d4ff10492acc211b36238768e14ccfd32d750 /lib/CodeGen/InstrSched/SchedGraph.cpp
parent360e17eaf1a2abda82b02235dc57d26d8f83c937 (diff)
Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant. Move files and fix #includes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSched/SchedGraph.cpp')
-rw-r--r--lib/CodeGen/InstrSched/SchedGraph.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/lib/CodeGen/InstrSched/SchedGraph.cpp b/lib/CodeGen/InstrSched/SchedGraph.cpp
index 9d3651a256..9e9af5b80d 100644
--- a/lib/CodeGen/InstrSched/SchedGraph.cpp
+++ b/lib/CodeGen/InstrSched/SchedGraph.cpp
@@ -21,8 +21,8 @@
#include "llvm/CodeGen/InstrSelection.h"
#include "llvm/Target/MachineInstrInfo.h"
#include "llvm/Target/MachineRegInfo.h"
-#include "llvm/Support/StringExtras.h"
#include "llvm/iOther.h"
+#include "Support/StringExtras.h"
#include <algorithm>
#include <hash_map>
#include <vector>
@@ -132,7 +132,7 @@ SchedGraphEdge::~SchedGraphEdge()
}
void SchedGraphEdge::dump(int indent=0) const {
- printIndent(indent); cout << *this;
+ cout << string(indent*2, ' ') << *this;
}
@@ -168,7 +168,7 @@ SchedGraphNode::~SchedGraphNode()
}
void SchedGraphNode::dump(int indent=0) const {
- printIndent(indent); cout << *this;
+ cout << string(indent*2, ' ') << *this;
}
@@ -1023,32 +1023,24 @@ operator<<(ostream& os, const SchedGraphEdge& edge)
ostream&
operator<<(ostream& os, const SchedGraphNode& node)
{
- printIndent(4, os);
- os << "Node " << node.nodeId << " : "
- << "latency = " << node.latency << endl;
-
- printIndent(6, os);
+ os << string(8, ' ')
+ << "Node " << node.nodeId << " : "
+ << "latency = " << node.latency << endl << string(12, ' ');
if (node.getMachineInstr() == NULL)
os << "(Dummy node)" << endl;
else
{
- os << *node.getMachineInstr() << endl;
-
- printIndent(6, os);
+ os << *node.getMachineInstr() << endl << string(12, ' ');
os << node.inEdges.size() << " Incoming Edges:" << endl;
for (unsigned i=0, N=node.inEdges.size(); i < N; i++)
- {
- printIndent(8, os);
- os << * node.inEdges[i];
- }
+ os << string(16, ' ') << *node.inEdges[i];
- printIndent(6, os);
- os << node.outEdges.size() << " Outgoing Edges:" << endl;
+ os << string(12, ' ') << node.outEdges.size()
+ << " Outgoing Edges:" << endl;
for (unsigned i=0, N=node.outEdges.size(); i < N; i++)
{
- printIndent(8, os);
- os << * node.outEdges[i];
+ os << string(16, ' ') << * node.outEdges[i];
}
}