| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include <algorithm> | 30 #include <algorithm> |
| 31 | 31 |
| 32 #include "v8.h" | 32 #include "v8.h" |
| 33 #include "codegen.h" | 33 #include "codegen.h" |
| 34 #include "full-codegen.h" | 34 #include "full-codegen.h" |
| 35 #include "hashmap.h" | 35 #include "hashmap.h" |
| 36 #include "hydrogen-bce.h" | 36 #include "hydrogen-bce.h" |
| 37 #include "hydrogen-bch.h" | 37 #include "hydrogen-bch.h" |
| 38 #include "hydrogen-canonicalize.h" | 38 #include "hydrogen-canonicalize.h" |
| 39 #include "hydrogen-check-elimination.h" |
| 39 #include "hydrogen-dce.h" | 40 #include "hydrogen-dce.h" |
| 40 #include "hydrogen-dehoist.h" | 41 #include "hydrogen-dehoist.h" |
| 41 #include "hydrogen-deoptimizing-mark.h" | 42 #include "hydrogen-deoptimizing-mark.h" |
| 42 #include "hydrogen-environment-liveness.h" | 43 #include "hydrogen-environment-liveness.h" |
| 43 #include "hydrogen-escape-analysis.h" | 44 #include "hydrogen-escape-analysis.h" |
| 44 #include "hydrogen-infer-representation.h" | 45 #include "hydrogen-infer-representation.h" |
| 45 #include "hydrogen-infer-types.h" | 46 #include "hydrogen-infer-types.h" |
| 46 #include "hydrogen-load-elimination.h" | 47 #include "hydrogen-load-elimination.h" |
| 47 #include "hydrogen-gvn.h" | 48 #include "hydrogen-gvn.h" |
| 48 #include "hydrogen-mark-deoptimize.h" | 49 #include "hydrogen-mark-deoptimize.h" |
| (...skipping 3066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3115 if (!CheckConstPhiUses()) { | 3116 if (!CheckConstPhiUses()) { |
| 3116 *bailout_reason = kUnsupportedPhiUseOfConstVariable; | 3117 *bailout_reason = kUnsupportedPhiUseOfConstVariable; |
| 3117 return false; | 3118 return false; |
| 3118 } | 3119 } |
| 3119 Run<HRedundantPhiEliminationPhase>(); | 3120 Run<HRedundantPhiEliminationPhase>(); |
| 3120 if (!CheckArgumentsPhiUses()) { | 3121 if (!CheckArgumentsPhiUses()) { |
| 3121 *bailout_reason = kUnsupportedPhiUseOfArguments; | 3122 *bailout_reason = kUnsupportedPhiUseOfArguments; |
| 3122 return false; | 3123 return false; |
| 3123 } | 3124 } |
| 3124 | 3125 |
| 3125 // Remove dead code and phis | 3126 if (FLAG_check_elimination) Run<HCheckEliminationPhase>(); |
| 3126 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>(); | 3127 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>(); |
| 3127 | |
| 3128 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>(); | 3128 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>(); |
| 3129 | 3129 |
| 3130 if (FLAG_load_elimination) Run<HLoadEliminationPhase>(); | 3130 if (FLAG_load_elimination) Run<HLoadEliminationPhase>(); |
| 3131 | 3131 |
| 3132 CollectPhis(); | 3132 CollectPhis(); |
| 3133 | 3133 |
| 3134 if (has_osr()) osr()->FinishOsrValues(); | 3134 if (has_osr()) osr()->FinishOsrValues(); |
| 3135 | 3135 |
| 3136 Run<HInferRepresentationPhase>(); | 3136 Run<HInferRepresentationPhase>(); |
| 3137 | 3137 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3155 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>(); | 3155 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>(); |
| 3156 | 3156 |
| 3157 if (FLAG_use_range) Run<HRangeAnalysisPhase>(); | 3157 if (FLAG_use_range) Run<HRangeAnalysisPhase>(); |
| 3158 | 3158 |
| 3159 Run<HComputeChangeUndefinedToNaN>(); | 3159 Run<HComputeChangeUndefinedToNaN>(); |
| 3160 Run<HComputeMinusZeroChecksPhase>(); | 3160 Run<HComputeMinusZeroChecksPhase>(); |
| 3161 | 3161 |
| 3162 // Eliminate redundant stack checks on backwards branches. | 3162 // Eliminate redundant stack checks on backwards branches. |
| 3163 Run<HStackCheckEliminationPhase>(); | 3163 Run<HStackCheckEliminationPhase>(); |
| 3164 | 3164 |
| 3165 if (FLAG_array_bounds_checks_elimination) { | 3165 if (FLAG_array_bounds_checks_elimination) Run<HBoundsCheckEliminationPhase>(); |
| 3166 Run<HBoundsCheckEliminationPhase>(); | 3166 if (FLAG_array_bounds_checks_hoisting) Run<HBoundsCheckHoistingPhase>(); |
| 3167 } | |
| 3168 if (FLAG_array_bounds_checks_hoisting) { | |
| 3169 Run<HBoundsCheckHoistingPhase>(); | |
| 3170 } | |
| 3171 if (FLAG_array_index_dehoisting) Run<HDehoistIndexComputationsPhase>(); | 3167 if (FLAG_array_index_dehoisting) Run<HDehoistIndexComputationsPhase>(); |
| 3172 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>(); | 3168 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>(); |
| 3173 | 3169 |
| 3174 RestoreActualValues(); | 3170 RestoreActualValues(); |
| 3175 | 3171 |
| 3176 return true; | 3172 return true; |
| 3177 } | 3173 } |
| 3178 | 3174 |
| 3179 | 3175 |
| 3180 void HGraph::RestoreActualValues() { | 3176 void HGraph::RestoreActualValues() { |
| (...skipping 6670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9851 if (ShouldProduceTraceOutput()) { | 9847 if (ShouldProduceTraceOutput()) { |
| 9852 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9848 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 9853 } | 9849 } |
| 9854 | 9850 |
| 9855 #ifdef DEBUG | 9851 #ifdef DEBUG |
| 9856 graph_->Verify(false); // No full verify. | 9852 graph_->Verify(false); // No full verify. |
| 9857 #endif | 9853 #endif |
| 9858 } | 9854 } |
| 9859 | 9855 |
| 9860 } } // namespace v8::internal | 9856 } } // namespace v8::internal |
| OLD | NEW |