From: Tanya Lattner Date: Sun, 1 May 2005 01:25:53 +0000 (+0000) Subject: Added extra constructor for superblocks. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=be2b84aa9e745f96dee808155ed5958d8e8c6afa;p=oota-llvm.git Added extra constructor for superblocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21642 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp index cc2edf2f051..97f047bbbf2 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 &bbs, + const TargetMachine &targ, + std::map &ignoreInstrs, + DependenceAnalyzer &DA, + std::map &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 &newNodes) diff --git a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h index 6820ca9cbe5..c3f7b6995f7 100644 --- a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h +++ b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h @@ -259,6 +259,12 @@ namespace llvm { //Copy constructor with maps to link old nodes to new nodes MSchedGraph(const MSchedGraph &G, std::map &newNodes); + MSchedGraph(std::vector &bbs, + const TargetMachine &targ, + std::map &ignoreInstrs, + DependenceAnalyzer &DA, + std::map &machineTollvm); + //Print graph void print(std::ostream &os) const;