Minor changes.
authorVikram S. Adve <vadve@cs.uiuc.edu>
Sun, 24 Mar 2002 03:40:59 +0000 (03:40 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Sun, 24 Mar 2002 03:40:59 +0000 (03:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1971 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InstrSched/SchedGraph.cpp
lib/Target/SparcV9/InstrSched/SchedGraph.cpp

index 890a911c488b5441aaa307c43ad08b12ee30db3c..e67ba93f20cbd325219e6db48246907fccbd11a0 100644 (file)
@@ -968,7 +968,7 @@ SchedGraphSet::~SchedGraphSet()
 {
   // delete all the graphs
   for (const_iterator I = begin(); I != end(); ++I)
-    delete I->second;
+    delete *I;
 }
 
 
@@ -979,7 +979,7 @@ SchedGraphSet::dump() const
        << "' ========\n\n";
   
   for (const_iterator I=begin(); I != end(); ++I)
-    I->second->dump();
+    (*I)->dump();
   
   cerr << "\n====== End graphs for method `" << method->getName()
        << "' ========\n\n";
@@ -991,14 +991,10 @@ SchedGraphSet::buildGraphsForMethod(const Method *method,
                                    const TargetMachine& target)
 {
   for (Method::const_iterator BI = method->begin(); BI != method->end(); ++BI)
-    {
-      SchedGraph* graph = new SchedGraph(*BI, target);
-      this->noteGraphForBlock(*BI, graph);
-    }   
+    this->addGraph(new SchedGraph(*BI, target));
 }
 
 
-
 std::ostream &operator<<(std::ostream &os, const SchedGraphEdge& edge)
 {
   os << "edge [" << edge.src->getNodeId() << "] -> ["
index 890a911c488b5441aaa307c43ad08b12ee30db3c..e67ba93f20cbd325219e6db48246907fccbd11a0 100644 (file)
@@ -968,7 +968,7 @@ SchedGraphSet::~SchedGraphSet()
 {
   // delete all the graphs
   for (const_iterator I = begin(); I != end(); ++I)
-    delete I->second;
+    delete *I;
 }
 
 
@@ -979,7 +979,7 @@ SchedGraphSet::dump() const
        << "' ========\n\n";
   
   for (const_iterator I=begin(); I != end(); ++I)
-    I->second->dump();
+    (*I)->dump();
   
   cerr << "\n====== End graphs for method `" << method->getName()
        << "' ========\n\n";
@@ -991,14 +991,10 @@ SchedGraphSet::buildGraphsForMethod(const Method *method,
                                    const TargetMachine& target)
 {
   for (Method::const_iterator BI = method->begin(); BI != method->end(); ++BI)
-    {
-      SchedGraph* graph = new SchedGraph(*BI, target);
-      this->noteGraphForBlock(*BI, graph);
-    }   
+    this->addGraph(new SchedGraph(*BI, target));
 }
 
 
-
 std::ostream &operator<<(std::ostream &os, const SchedGraphEdge& edge)
 {
   os << "edge [" << edge.src->getNodeId() << "] -> ["