diff options
author | Tanya Lattner <tonic@nondot.org> | 2004-05-08 16:12:10 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2004-05-08 16:12:10 +0000 |
commit | 73e3e2e10f6a83f72651bb9e7d0a6ad107676ab9 (patch) | |
tree | 804cf220cc370b3640c97f7afa7ac9a554a8ed6b /lib/CodeGen/ModuloScheduling/ModuloScheduling.h | |
parent | 429022bf830f25c1199a47aab5ffd9a0b3f17a1d (diff) |
Updating my versions of ModuloScheduling in cvs. Still not complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ModuloScheduling/ModuloScheduling.h')
-rw-r--r-- | lib/CodeGen/ModuloScheduling/ModuloScheduling.h | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/lib/CodeGen/ModuloScheduling/ModuloScheduling.h b/lib/CodeGen/ModuloScheduling/ModuloScheduling.h index 296d7054e2..b573b10486 100644 --- a/lib/CodeGen/ModuloScheduling/ModuloScheduling.h +++ b/lib/CodeGen/ModuloScheduling/ModuloScheduling.h @@ -41,22 +41,53 @@ namespace llvm { //Map that holds node to node attribute information std::map<MSchedGraphNode*, MSNodeAttributes> nodeToAttributesMap; + //Map to hold all reccurrences + std::set<std::pair<int, std::vector<MSchedGraphNode*> > > recurrenceList; + + //Set of edges to ignore, stored as src node and index into vector of successors + std::set<std::pair<MSchedGraphNode*, unsigned> > edgesToIgnore; + + //Vector containing the partial order + std::vector<std::vector<MSchedGraphNode*> > partialOrder; + + //Vector containing the final node order + std::vector<MSchedGraphNode*> FinalNodeOrder; + + //Schedule table, key is the cycle number and the vector is resource, node pairs + std::map<unsigned, std::vector<std::pair<unsigned, std::vector<MSchedGraphNode*> > > > schedule; + + //Current initiation interval + int II; + //Internal functions bool MachineBBisValid(const MachineBasicBlock *BI); int calculateResMII(const MachineBasicBlock *BI); + int calculateRecMII(MSchedGraph *graph, int MII); void calculateNodeAttributes(MSchedGraph *graph, int MII); - void calculateASAP(MSchedGraphNode *node, MSNodeAttributes &attributes, - int MII,std::set<MSchedGraphNode*> &visitedNodes); - void calculateALAP(MSchedGraphNode *node, MSNodeAttributes &attributes, int MII, - int maxASAP, std::set<MSchedGraphNode*> &visitedNodes); - void calculateHeight(MSchedGraphNode *node, - MSNodeAttributes &attributes, std::set<MSchedGraphNode*> &visitedNodes); - void calculateDepth(MSchedGraphNode *node, MSNodeAttributes &attributes, - std::set<MSchedGraphNode*> &visitedNodes); + + bool ignoreEdge(MSchedGraphNode *srcNode, MSchedGraphNode *destNode); + + + int calculateASAP(MSchedGraphNode *node, int MII,MSchedGraphNode *destNode); + int calculateALAP(MSchedGraphNode *node, int MII, int maxASAP, MSchedGraphNode *srcNode); + + int calculateHeight(MSchedGraphNode *node,MSchedGraphNode *srcNode); + int calculateDepth(MSchedGraphNode *node, MSchedGraphNode *destNode); int findMaxASAP(); - void ModuloSchedulingPass::orderNodes(); - void findAllReccurrences(MSchedGraphNode *node, std::vector<MSchedGraphNode*> &visitedNodes); + void orderNodes(); + void findAllReccurrences(MSchedGraphNode *node, + std::vector<MSchedGraphNode*> &visitedNodes, int II); + void addReccurrence(std::vector<MSchedGraphNode*> &recurrence, int II, MSchedGraphNode*, MSchedGraphNode*); + + void computePartialOrder(); + void computeSchedule(); + bool scheduleNode(MSchedGraphNode *node, + int start, int end); + + void predIntersect(std::vector<MSchedGraphNode*> &CurrentSet, std::vector<MSchedGraphNode*> &IntersectResult); + void succIntersect(std::vector<MSchedGraphNode*> &CurrentSet, std::vector<MSchedGraphNode*> &IntersectResult); + public: ModuloSchedulingPass(TargetMachine &targ) : target(targ) {} virtual bool runOnFunction(Function &F); |