OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 260 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
261 } | 261 } |
262 } | 262 } |
263 if (FLAG_loop_invariant_code_motion && | 263 if (FLAG_loop_invariant_code_motion && |
264 (parsed_function.function().deoptimization_counter() < | 264 (parsed_function.function().deoptimization_counter() < |
265 (FLAG_deoptimization_counter_threshold - 1))) { | 265 (FLAG_deoptimization_counter_threshold - 1))) { |
266 LICM licm(flow_graph); | 266 LICM licm(flow_graph); |
267 licm.Optimize(); | 267 licm.Optimize(); |
268 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 268 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
269 } | 269 } |
| 270 flow_graph->RemoveRedefinitions(); |
270 | 271 |
271 if (FLAG_range_analysis) { | 272 if (FLAG_range_analysis) { |
272 // We have to perform range analysis after LICM because it | 273 // We have to perform range analysis after LICM because it |
273 // optimistically moves CheckSmi through phis into loop preheaders | 274 // optimistically moves CheckSmi through phis into loop preheaders |
274 // making some phis smi. | 275 // making some phis smi. |
275 optimizer.InferSmiRanges(); | 276 optimizer.InferSmiRanges(); |
276 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 277 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
277 } | 278 } |
278 | 279 |
279 if (FLAG_constant_propagation) { | 280 if (FLAG_constant_propagation) { |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 Object::Handle(isolate->object_store()->sticky_error()); | 702 Object::Handle(isolate->object_store()->sticky_error()); |
702 isolate->object_store()->clear_sticky_error(); | 703 isolate->object_store()->clear_sticky_error(); |
703 isolate->set_long_jump_base(base); | 704 isolate->set_long_jump_base(base); |
704 return result.raw(); | 705 return result.raw(); |
705 } | 706 } |
706 UNREACHABLE(); | 707 UNREACHABLE(); |
707 return Object::null(); | 708 return Object::null(); |
708 } | 709 } |
709 | 710 |
710 } // namespace dart | 711 } // namespace dart |
OLD | NEW |