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

Unified Diff: runtime/vm/flow_graph_optimizer.h

Issue 12221139: Revert "Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/flow_graph_optimizer.cc » ('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 a0922ef211fb922d5b0607ca75c38bb332e25ab9..b53054e2f45b2f4bef6c74145ba5568059091282 100644
--- a/runtime/vm/flow_graph_optimizer.h
+++ b/runtime/vm/flow_graph_optimizer.h
@@ -121,6 +121,39 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
class ParsedFunction;
+class FlowGraphTypePropagator : public FlowGraphVisitor {
+ public:
+ explicit FlowGraphTypePropagator(FlowGraph* flow_graph)
+ : FlowGraphVisitor(flow_graph->reverse_postorder()),
+ parsed_function_(flow_graph->parsed_function()),
+ flow_graph_(flow_graph),
+ still_changing_(false) { }
+ virtual ~FlowGraphTypePropagator() { }
+
+ const ParsedFunction& parsed_function() const { return parsed_function_; }
+
+ void PropagateTypes();
+
+ private:
+ virtual void VisitBlocks();
+
+ virtual void VisitAssertAssignable(AssertAssignableInstr* instr);
+ virtual void VisitAssertBoolean(AssertBooleanInstr* instr);
+ virtual void VisitInstanceOf(InstanceOfInstr* instr);
+
+ virtual void VisitGraphEntry(GraphEntryInstr* graph_entry);
+ virtual void VisitJoinEntry(JoinEntryInstr* join_entry);
+ virtual void VisitPhi(PhiInstr* phi);
+ virtual void VisitParameter(ParameterInstr* param);
+ virtual void VisitPushArgument(PushArgumentInstr* bind);
+
+ const ParsedFunction& parsed_function_;
+ FlowGraph* flow_graph_;
+ bool still_changing_;
+ DISALLOW_COPY_AND_ASSIGN(FlowGraphTypePropagator);
+};
+
+
// Loop invariant code motion.
class LICM : public AllStatic {
public:
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698