mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
8dc9982e2e
commit
f68b8a2dee
@ -29,6 +29,7 @@ protected:
|
|||||||
std::vector<SchedGraphEdge*> inEdges;
|
std::vector<SchedGraphEdge*> inEdges;
|
||||||
std::vector<SchedGraphEdge*> outEdges;
|
std::vector<SchedGraphEdge*> outEdges;
|
||||||
int latency;
|
int latency;
|
||||||
|
int origIndexInBB; // original position of instr in BB
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef std::vector<SchedGraphEdge*>::iterator iterator;
|
typedef std::vector<SchedGraphEdge*>::iterator iterator;
|
||||||
@ -41,7 +42,7 @@ public:
|
|||||||
int getLatency() const { return latency; }
|
int getLatency() const { return latency; }
|
||||||
unsigned getNumInEdges() const { return inEdges.size(); }
|
unsigned getNumInEdges() const { return inEdges.size(); }
|
||||||
unsigned getNumOutEdges() const { return outEdges.size(); }
|
unsigned getNumOutEdges() const { return outEdges.size(); }
|
||||||
|
int getOrigIndexInBB() const { return origIndexInBB; }
|
||||||
|
|
||||||
// Iterators
|
// Iterators
|
||||||
iterator beginInEdges() { return inEdges.begin(); }
|
iterator beginInEdges() { return inEdges.begin(); }
|
||||||
@ -68,7 +69,8 @@ protected:
|
|||||||
// disable default constructor and provide a ctor for single-block graphs
|
// disable default constructor and provide a ctor for single-block graphs
|
||||||
SchedGraphNodeCommon(); // DO NOT IMPLEMENT
|
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();
|
virtual ~SchedGraphNodeCommon();
|
||||||
|
|
||||||
//Functions to add and remove edges
|
//Functions to add and remove edges
|
||||||
|
Loading…
Reference in New Issue
Block a user