Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.h |
| =================================================================== |
| --- runtime/vm/flow_graph_optimizer.h (revision 27294) |
| +++ runtime/vm/flow_graph_optimizer.h (working copy) |
| @@ -246,6 +246,16 @@ |
| // by range analysis. |
| static void OptimizeBranches(FlowGraph* graph); |
| + // Eliminate branches that have the same true- and false-target: For example, |
| + // this occurs after expressions like |
| + // |
| + // if (a == null) || (b == null) { |
|
Kevin Millikin (Google)
2013/09/27 11:03:43
You need more parentheses in the comment :)
Florian Schneider
2013/09/30 12:19:23
Less is more :)
Done.
|
| + // ... |
| + // } |
| + // |
| + // where b is known to be null. |
| + static void RemoveRedundantBranches(FlowGraph* graph); |
| + |
| // Used to initialize the abstract value of definitions. |
| static RawObject* Unknown() { return Object::unknown_constant().raw(); } |
| @@ -253,6 +263,7 @@ |
| void Analyze(); |
| void VisitBranches(); |
| void Transform(); |
| + void EliminateRedundantBranches(); |
| void SetReachable(BlockEntryInstr* block); |
| void SetValue(Definition* definition, const Object& value); |