diff options
author | Tanya Lattner <tonic@nondot.org> | 2005-05-01 01:25:53 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2005-05-01 01:25:53 +0000 |
commit | be2b84aa9e745f96dee808155ed5958d8e8c6afa (patch) | |
tree | b2c7e91f0c0e1fbbfa0800250c84ee0c8aab4c7c /lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp | |
parent | c50156360af2e3345b9bf66d2ec2a84b9b55ff9a (diff) |
Added extra constructor for superblocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp')
-rw-r--r-- | lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp index cc2edf2f05..97f047bbbf 100644 --- a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp +++ b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp @@ -167,6 +167,28 @@ MSchedGraph::MSchedGraph(const MachineBasicBlock *bb, //addBranchEdges(); } +//Create a graph for a machine block. The ignoreInstrs map is so that +//we ignore instructions associated to the index variable since this +//is a special case in Modulo Scheduling. We only want to deal with +//the body of the loop. +MSchedGraph::MSchedGraph(std::vector<const MachineBasicBlock*> &bbs, + const TargetMachine &targ, + std::map<const MachineInstr*, unsigned> &ignoreInstrs, + DependenceAnalyzer &DA, + std::map<MachineInstr*, Instruction*> &machineTollvm) + : BBs(bbs), Target(targ) { + + //Make sure there is at least one BB and it is not null, + assert(((bbs.size() >= 1) && bbs[1] != NULL) && "Basic Block is null"); + + //Create nodes and edges for this BB + buildNodesAndEdges(ignoreInstrs, DA, machineTollvm); + + //Experimental! + //addBranchEdges(); +} + + //Copies the graph and keeps a map from old to new nodes MSchedGraph::MSchedGraph(const MSchedGraph &G, std::map<MSchedGraphNode*, MSchedGraphNode*> &newNodes) |