aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SchedGraphCommon.h
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2003-08-28 15:31:28 +0000
committerTanya Lattner <tonic@nondot.org>2003-08-28 15:31:28 +0000
commitf68b8a2dee6c48ee005b728b355ba149e1d5ab95 (patch)
tree0643bc688fb7f041f932884154cf43c7c3b75328 /include/llvm/CodeGen/SchedGraphCommon.h
parent8dc9982e2e65fa2a2105c31d389f09bae7e5fc7c (diff)
Moved index in BB to common graph class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SchedGraphCommon.h')
-rw-r--r--include/llvm/CodeGen/SchedGraphCommon.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SchedGraphCommon.h b/include/llvm/CodeGen/SchedGraphCommon.h
index fc2b1bac6f..46e49e14ea 100644
--- a/include/llvm/CodeGen/SchedGraphCommon.h
+++ b/include/llvm/CodeGen/SchedGraphCommon.h
@@ -29,6 +29,7 @@ protected:
std::vector<SchedGraphEdge*> inEdges;
std::vector<SchedGraphEdge*> outEdges;
int latency;
+ int origIndexInBB; // original position of instr in BB
public:
typedef std::vector<SchedGraphEdge*>::iterator iterator;
@@ -41,7 +42,7 @@ public:
int getLatency() const { return latency; }
unsigned getNumInEdges() const { return inEdges.size(); }
unsigned getNumOutEdges() const { return outEdges.size(); }
-
+ int getOrigIndexInBB() const { return origIndexInBB; }
// Iterators
iterator beginInEdges() { return inEdges.begin(); }
@@ -68,7 +69,8 @@ protected:
// disable default constructor and provide a ctor for single-block graphs
SchedGraphNodeCommon(); // DO NOT IMPLEMENT
- inline SchedGraphNodeCommon(unsigned Id) : ID(Id), latency(0) {}
+ inline SchedGraphNodeCommon(unsigned Id, int index) : ID(Id), latency(0),
+ origIndexInBB(index) {}
virtual ~SchedGraphNodeCommon();
//Functions to add and remove edges