Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: runtime/vm/flow_graph_optimizer.h

Issue 10857016: Refactored FlowGraphBuilder into a separate FlowGraph representation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revision based on Kevin's review. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/il_printer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.h
diff --git a/runtime/vm/flow_graph_optimizer.h b/runtime/vm/flow_graph_optimizer.h
index a6e9d4eec1dd29ed51b0e2c40e3ea028cb6b9496..97606c7e318a33f4da4a84e4ed4644227067afce 100644
--- a/runtime/vm/flow_graph_optimizer.h
+++ b/runtime/vm/flow_graph_optimizer.h
@@ -6,6 +6,7 @@
#define VM_FLOW_GRAPH_OPTIMIZER_H_
#include "vm/intermediate_language.h"
+#include "vm/flow_graph.h"
namespace dart {
@@ -13,8 +14,8 @@ template <typename T> class GrowableArray;
class FlowGraphOptimizer : public FlowGraphVisitor {
public:
- explicit FlowGraphOptimizer(const GrowableArray<BlockEntryInstr*>& blocks)
- : FlowGraphVisitor(blocks) {}
+ explicit FlowGraphOptimizer(const FlowGraph& flow_graph)
+ : FlowGraphVisitor(flow_graph.reverse_postorder()) {}
virtual ~FlowGraphOptimizer() {}
void ApplyICData();
@@ -53,8 +54,8 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
// method, i.e., does not contain any calls to runtime or other Dart code.
class FlowGraphAnalyzer : public ValueObject {
public:
- explicit FlowGraphAnalyzer(const GrowableArray<BlockEntryInstr*>& blocks)
- : blocks_(blocks), is_leaf_(false) {}
+ explicit FlowGraphAnalyzer(const FlowGraph& flow_graph)
+ : blocks_(flow_graph.reverse_postorder()), is_leaf_(false) {}
virtual ~FlowGraphAnalyzer() {}
void Analyze();
@@ -74,10 +75,9 @@ class ParsedFunction;
class FlowGraphTypePropagator : public FlowGraphVisitor {
public:
- FlowGraphTypePropagator(const ParsedFunction& parsed_function,
- const GrowableArray<BlockEntryInstr*>& blocks)
- : FlowGraphVisitor(blocks),
- parsed_function_(parsed_function),
+ explicit FlowGraphTypePropagator(const FlowGraph& flow_graph)
+ : FlowGraphVisitor(flow_graph.reverse_postorder()),
+ parsed_function_(flow_graph.parsed_function()),
still_changing_(false) { }
virtual ~FlowGraphTypePropagator() { }
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/il_printer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698