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

Unified Diff: runtime/vm/flow_graph_optimizer.h

Issue 12335063: Add functions for setting an environment and rebinding a use. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased and incorportated review comments. 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_inliner.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 5a13707787f21dcc179eabc04b38adf30b5601b6..83515bc50105d19292b921e70f2119e2c59e790e 100644
--- a/runtime/vm/flow_graph_optimizer.h
+++ b/runtime/vm/flow_graph_optimizer.h
@@ -162,19 +162,25 @@ class ParsedFunction;
// Loop invariant code motion.
-class LICM : public AllStatic {
+class LICM : public ValueObject {
public:
- static void Optimize(FlowGraph* flow_graph);
+ explicit LICM(FlowGraph* flow_graph);
+
+ void Optimize();
private:
- static void Hoist(ForwardInstructionIterator* it,
- BlockEntryInstr* pre_header,
- Instruction* current);
-
- static void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it,
- BlockEntryInstr* header,
- BlockEntryInstr* pre_header,
- CheckSmiInstr* current);
+ FlowGraph* flow_graph() const { return flow_graph_; }
+
+ void Hoist(ForwardInstructionIterator* it,
+ BlockEntryInstr* pre_header,
+ Instruction* current);
+
+ void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it,
+ BlockEntryInstr* header,
+ BlockEntryInstr* pre_header,
+ CheckSmiInstr* current);
+
+ FlowGraph* const flow_graph_;
};
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698