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

Unified Diff: runtime/vm/flow_graph_optimizer.h

Issue 734093002: When constant folding x == y take reachability of blocks into account. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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 3a98e8f21b5710ebb5e54f98dd5be747b7ec61f2..7ecb625fabe262a11950098ae6d01247ac37c9bd 100644
--- a/runtime/vm/flow_graph_optimizer.h
+++ b/runtime/vm/flow_graph_optimizer.h
@@ -345,7 +345,10 @@ class ConstantPropagator : public FlowGraphVisitor {
void EliminateRedundantBranches();
void SetReachable(BlockEntryInstr* block);
- void SetValue(Definition* definition, const Object& value);
+ bool SetValue(Definition* definition, const Object& value);
+
+ Definition* UnwrapPhi(Definition* defn);
+ void MarkPhi(Definition* defn);
// Assign the join (least upper bound) of a pair of abstract values to the
// first one.
@@ -381,14 +384,11 @@ class ConstantPropagator : public FlowGraphVisitor {
// preorder number.
BitVector* reachable_;
- // Definitions can move up the lattice twice, so we use a mark bit to
- // indicate that they are already on the worklist in order to avoid adding
- // them again. Indexed by SSA temp index.
- BitVector* definition_marks_;
+ BitVector* marked_phis_;
// Worklists of blocks and definitions.
GrowableArray<BlockEntryInstr*> block_worklist_;
- GrowableArray<Definition*> definition_worklist_;
+ DefinitionWorklist definition_worklist_;
};
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698