aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ModuloScheduling/MSchedGraph.h
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2004-05-26 06:27:18 +0000
committerTanya Lattner <tonic@nondot.org>2004-05-26 06:27:18 +0000
commit4cffb588f5fafe4b288d4361e115bedefe979495 (patch)
tree5100f3a8da1df005089120300b9818bf1f559fe5 /lib/CodeGen/ModuloScheduling/MSchedGraph.h
parent1812268126996049b0bedbcde079484d7136b8af (diff)
Updating my cvs versions. THis is still in progress and much will be changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ModuloScheduling/MSchedGraph.h')
-rw-r--r--lib/CodeGen/ModuloScheduling/MSchedGraph.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/ModuloScheduling/MSchedGraph.h b/lib/CodeGen/ModuloScheduling/MSchedGraph.h
index 9680fc0994..0dcbb496f1 100644
--- a/lib/CodeGen/ModuloScheduling/MSchedGraph.h
+++ b/lib/CodeGen/ModuloScheduling/MSchedGraph.h
@@ -58,13 +58,14 @@ namespace llvm {
const MachineInstr* Inst; //Machine Instruction
MSchedGraph* Parent; //Graph this node belongs to
unsigned latency; //Latency of Instruction
-
+ bool isBranchInstr; //Is this node the branch instr or not
+
std::vector<MSchedGraphNode*> Predecessors; //Predecessor Nodes
std::vector<MSchedGraphEdge> Successors;
public:
MSchedGraphNode(const MachineInstr *inst, MSchedGraph *graph,
- unsigned late=0);
+ unsigned late=0, bool isBranch=false);
//Iterators
typedef std::vector<MSchedGraphNode*>::iterator pred_iterator;
@@ -85,6 +86,7 @@ namespace llvm {
MSchedGraphNode> succ_iterator;
succ_iterator succ_begin();
succ_iterator succ_end();
+
void addOutEdge(MSchedGraphNode *destination,
@@ -103,7 +105,7 @@ namespace llvm {
bool isSuccessor(MSchedGraphNode *);
bool isPredecessor(MSchedGraphNode *);
-
+ bool isBranch() { return isBranchInstr; }
//Debug support
void print(std::ostream &os) const;
@@ -200,7 +202,7 @@ namespace llvm {
iterator begin() { return GraphMap.begin(); }
reverse_iterator rbegin() { return GraphMap.rbegin(); }
reverse_iterator rend() { return GraphMap.rend(); }
-
+ const TargetMachine* getTarget() { return &Target; }
};