| 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/flow_graph_allocator.h" | 5 #include "vm/flow_graph_allocator.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 #include "vm/il_printer.h" | 9 #include "vm/il_printer.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 | 1528 |
| 1529 // Finish allocation. | 1529 // Finish allocation. |
| 1530 AdvanceActiveIntervals(kMaxPosition); | 1530 AdvanceActiveIntervals(kMaxPosition); |
| 1531 TRACE_ALLOC(("Allocation completed\n")); | 1531 TRACE_ALLOC(("Allocation completed\n")); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 | 1534 |
| 1535 void FlowGraphAllocator::ConnectSplitSiblings(LiveRange* range, | 1535 void FlowGraphAllocator::ConnectSplitSiblings(LiveRange* range, |
| 1536 BlockEntryInstr* source_block, | 1536 BlockEntryInstr* source_block, |
| 1537 BlockEntryInstr* target_block) { | 1537 BlockEntryInstr* target_block) { |
| 1538 TRACE_ALLOC(("Connect source_block=%d, target_block=%d\n", |
| 1539 source_block->block_id(), |
| 1540 target_block->block_id())); |
| 1538 if (range->next_sibling() == NULL) { | 1541 if (range->next_sibling() == NULL) { |
| 1539 // Nothing to connect. The whole range was allocated to the same location. | 1542 // Nothing to connect. The whole range was allocated to the same location. |
| 1540 TRACE_ALLOC(("range %d has no siblings\n", range->vreg())); | 1543 TRACE_ALLOC(("range %d has no siblings\n", range->vreg())); |
| 1541 return; | 1544 return; |
| 1542 } | 1545 } |
| 1543 | 1546 |
| 1544 const intptr_t source_pos = source_block->end_pos() - 1; | 1547 const intptr_t source_pos = source_block->end_pos() - 1; |
| 1545 ASSERT(IsInstructionPosition(source_pos)); | 1548 ASSERT(IsInstructionPosition(source_pos)); |
| 1546 | 1549 |
| 1547 const intptr_t target_pos = target_block->start_pos(); | 1550 const intptr_t target_pos = target_block->start_pos(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 | 1651 |
| 1649 if (FLAG_trace_ssa_allocator) { | 1652 if (FLAG_trace_ssa_allocator) { |
| 1650 OS::Print("-- ir after allocation -------------------------\n"); | 1653 OS::Print("-- ir after allocation -------------------------\n"); |
| 1651 FlowGraphPrinter printer(Function::Handle(), block_order_, true); | 1654 FlowGraphPrinter printer(Function::Handle(), block_order_, true); |
| 1652 printer.PrintBlocks(); | 1655 printer.PrintBlocks(); |
| 1653 } | 1656 } |
| 1654 } | 1657 } |
| 1655 | 1658 |
| 1656 | 1659 |
| 1657 } // namespace dart | 1660 } // namespace dart |
| OLD | NEW |