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/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
446 // Propagate types after store-load-forwarding. Some phis may have | 446 // Propagate types after store-load-forwarding. Some phis may have |
447 // become smi phis that can be processed by range analysis. | 447 // become smi phis that can be processed by range analysis. |
448 FlowGraphTypePropagator::Propagate(flow_graph); | 448 FlowGraphTypePropagator::Propagate(flow_graph); |
449 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 449 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
450 | 450 |
451 // We have to perform range analysis after LICM because it | 451 // We have to perform range analysis after LICM because it |
452 // optimistically moves CheckSmi through phis into loop preheaders | 452 // optimistically moves CheckSmi through phis into loop preheaders |
453 // making some phis smi. | 453 // making some phis smi. |
454 optimizer.InferIntRanges(); | 454 optimizer.InferIntRanges(); |
455 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 455 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
456 | |
457 // TODO(johnmccutchan): Do integer instruction selection after | |
Florian Schneider
2014/07/11 15:33:58
Fine with me. But is there a problem that I don't
Cutch
2014/07/11 22:04:13
No, it was me not understanding entirely what you
| |
458 // range analysis but before range constraints are removed. | |
459 // Select integer instructions based on range analysis result. | |
460 optimizer.SelectIntegerInstructions(); | |
461 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | |
456 } | 462 } |
457 | 463 |
458 if (FLAG_constant_propagation) { | 464 if (FLAG_constant_propagation) { |
459 // Constant propagation can use information from range analysis to | 465 // Constant propagation can use information from range analysis to |
460 // find unreachable branch targets and eliminate branches that have | 466 // find unreachable branch targets and eliminate branches that have |
461 // the same true- and false-target. | 467 // the same true- and false-target. |
462 ConstantPropagator::OptimizeBranches(flow_graph); | 468 ConstantPropagator::OptimizeBranches(flow_graph); |
463 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 469 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
464 } | 470 } |
465 | 471 |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
969 const Object& result = | 975 const Object& result = |
970 Object::Handle(isolate->object_store()->sticky_error()); | 976 Object::Handle(isolate->object_store()->sticky_error()); |
971 isolate->object_store()->clear_sticky_error(); | 977 isolate->object_store()->clear_sticky_error(); |
972 return result.raw(); | 978 return result.raw(); |
973 } | 979 } |
974 UNREACHABLE(); | 980 UNREACHABLE(); |
975 return Object::null(); | 981 return Object::null(); |
976 } | 982 } |
977 | 983 |
978 } // namespace dart | 984 } // namespace dart |
OLD | NEW |