Index: src/hydrogen.cc |
=================================================================== |
--- src/hydrogen.cc (revision 8995) |
+++ src/hydrogen.cc (working copy) |
@@ -2328,25 +2328,26 @@ |
graph()->MarkDeoptimizeOnUndefined(); |
graph()->InsertRepresentationChanges(); |
+ graph()->InitializeInferredTypes(); |
+ graph()->Canonicalize(); |
+ |
+ // Perform common subexpression elimination and loop-invariant code motion. |
+ if (FLAG_use_gvn) { |
+ HPhase phase("Global value numbering", graph()); |
+ HGlobalValueNumberer gvn(graph(), info()); |
+ gvn.Analyze(); |
+ } |
+ |
if (FLAG_use_range) { |
HRangeAnalysis rangeAnalysis(graph()); |
rangeAnalysis.Analyze(); |
} |
- graph()->InitializeInferredTypes(); |
- graph()->Canonicalize(); |
graph()->ComputeMinusZeroChecks(); |
// Eliminate redundant stack checks on backwards branches. |
HStackCheckEliminator sce(graph()); |
sce.Process(); |
- // Perform common subexpression elimination and loop-invariant code motion. |
- if (FLAG_use_gvn) { |
- HPhase phase("Global value numbering", graph()); |
- HGlobalValueNumberer gvn(graph(), info()); |
- gvn.Analyze(); |
- } |
- |
// Replace the results of check instructions with the original value, if the |
// result is used. This is safe now, since we don't do code motion after this |
// point. It enables better register allocation since the value produced by |