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

Unified Diff: runtime/vm/flow_graph_optimizer.h

Issue 10949019: Turn definitions that do not produce results (e.g. Checks) into instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
Index: runtime/vm/flow_graph_optimizer.h
diff --git a/runtime/vm/flow_graph_optimizer.h b/runtime/vm/flow_graph_optimizer.h
index 4efbbf0b7ee26f0feb36a463a47edf57ab679db1..00ec3ed6751a153e7bd4ff8aff98df5a381550f6 100644
--- a/runtime/vm/flow_graph_optimizer.h
+++ b/runtime/vm/flow_graph_optimizer.h
@@ -36,10 +36,8 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
virtual void VisitEqualityCompare(EqualityCompareInstr* instr);
virtual void VisitBranch(BranchInstr* instr);
- // TODO(fschneider): Once we get rid of the distinction between Instruction
- // and computation, this can be made private again.
- void InsertBefore(Instruction* instr,
- Definition* defn,
+ void InsertBefore(Instruction* next,
+ Instruction* instr,
Environment* env,
Definition::UseKind use_kind);
@@ -55,8 +53,8 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
void AddCheckClass(InstanceCallInstr* call, Value* value);
- void InsertAfter(Instruction* instr,
- Definition* defn,
+ void InsertAfter(Instruction* prev,
+ Instruction* instr,
Environment* env,
Definition::UseKind use_kind);
@@ -134,12 +132,12 @@ class LICM : public AllStatic {
private:
static void Hoist(ForwardInstructionIterator* it,
BlockEntryInstr* pre_header,
- Definition* current);
+ Instruction* current);
static void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it,
BlockEntryInstr* header,
BlockEntryInstr* pre_header,
- Definition* current);
+ Instruction* current);
};
@@ -152,7 +150,7 @@ class DominatorBasedCSE : public AllStatic {
private:
static void OptimizeRecursive(
BlockEntryInstr* entry,
- DirectChainedHashMap<Definition*>* map);
+ DirectChainedHashMap<Instruction*>* map);
};

Powered by Google App Engine
This is Rietveld 408576698