]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - dfg/DFGNaturalLoops.cpp
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / dfg / DFGNaturalLoops.cpp
index b43ba95e587efccf0b6f49325e2cd996f5df2a3f..edb78cf5e5d158b1a46dc8013fdfd10bdf7ac2e0 100644 (file)
@@ -45,6 +45,11 @@ void NaturalLoop::dump(PrintStream& out) const
 NaturalLoops::NaturalLoops() { }
 NaturalLoops::~NaturalLoops() { }
 
+void NaturalLoops::computeDependencies(Graph& graph)
+{
+    graph.m_dominators.computeIfNecessary(graph);
+}
+
 void NaturalLoops::compute(Graph& graph)
 {
     // Implement the classic dominator-based natural loop finder. The first
@@ -57,11 +62,9 @@ void NaturalLoops::compute(Graph& graph)
     
     static const bool verbose = false;
     
-    graph.m_dominators.computeIfNecessary(graph);
-    
     if (verbose) {
         dataLog("Dominators:\n");
-        graph.m_dominators.dump(graph, WTF::dataFile());
+        graph.m_dominators.dump(WTF::dataFile());
     }
     
     m_loops.resize(0);