[llvm-commits] CVS: llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp MSchedGraph.h

Tanya Brethour tbrethou at cs.uiuc.edu
Sat Apr 30 18:26:09 PDT 2005



Changes in directory llvm/lib/Target/SparcV9/ModuloScheduling:

MSchedGraph.cpp updated: 1.20 -> 1.21
MSchedGraph.h updated: 1.13 -> 1.14
---
Log message:

Added extra constructor for superblocks.


---
Diffs of the changes:  (+28 -0)

 MSchedGraph.cpp |   22 ++++++++++++++++++++++
 MSchedGraph.h   |    6 ++++++
 2 files changed, 28 insertions(+)


Index: llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp
diff -u llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp:1.20 llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp:1.21
--- llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp:1.20	Sat Apr 30 18:07:58 2005
+++ llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp	Sat Apr 30 20:25:53 2005
@@ -167,6 +167,28 @@
   //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) 


Index: llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h
diff -u llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h:1.13 llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h:1.14
--- llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h:1.13	Sat Apr 30 18:07:58 2005
+++ llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h	Sat Apr 30 20:25:53 2005
@@ -259,6 +259,12 @@
     //Copy constructor with maps to link old nodes to new nodes
     MSchedGraph(const MSchedGraph &G, std::map<MSchedGraphNode*, MSchedGraphNode*> &newNodes);
     
+    MSchedGraph(std::vector<const MachineBasicBlock*> &bbs, 
+		const TargetMachine &targ, 
+		std::map<const MachineInstr*, unsigned> &ignoreInstrs, 
+		DependenceAnalyzer &DA, 
+		std::map<MachineInstr*, Instruction*> &machineTollvm);
+
     //Print graph
     void print(std::ostream &os) const;
 






More information about the llvm-commits mailing list