Chromium Code Reviews| Index: runtime/vm/flow_graph_allocator.h |
| diff --git a/runtime/vm/flow_graph_allocator.h b/runtime/vm/flow_graph_allocator.h |
| index d92801e17cda76a48d2efe3aeb2bb5216697e11d..6b6c15e3c0e4dd8ef5c45e9b1059fe22abe08fd4 100644 |
| --- a/runtime/vm/flow_graph_allocator.h |
| +++ b/runtime/vm/flow_graph_allocator.h |
| @@ -52,13 +52,19 @@ class FlowGraphAllocator : public ValueObject { |
| // linearly assign consequent lifetime positions to every instruction. |
| // We assign position as follows: |
| // |
| - // 2 * n - even position corresponding to an implicit parallel move |
| - // preceding the instruction; |
| + // 2 * n - even position corresponding to instruction's start; |
| // |
| - // 2 * n + 1 - odd position corresponding to instruction itself; |
| + // 2 * n + 1 - odd position corresponding to instruction's end; |
| // |
| - // Having positions corresponding to parallel moves between every two |
| - // instructions allows us to capture non-trivial shapes of use intervals. |
| + // Having two positions per instruction allows us to capture non-trivial |
| + // shapes of use intervals: e.g. by placing a use at the start or end the |
| + // end position we can distinguish between instructions that need value |
|
srdjan
2012/07/31 00:18:15
Fix comment: "..by placing a use at the start or e
Vyacheslav Egorov (Google)
2012/07/31 11:17:07
Done.
|
| + // at the register only at their start and those instructions that |
| + // need value in the register until the end of instruction's body. |
| + // Register allocator can perform splitting of live ranges at any position. |
| + // An implicit ParallelMove will be inserted by ConnectSplitSiblings where |
| + // required to resolve data flow between split siblings when allocation |
| + // is finished. |
| // For specific examples see comments inside ProcessOneInstruction. |
| // Additionally creates parallel moves at the joins' predecessors |
| // that will be used for phi resolution. |
| @@ -74,7 +80,7 @@ class FlowGraphAllocator : public ValueObject { |
| Instruction* ConnectOutgoingPhiMoves(BlockEntryInstr* block); |
| void ProcessOneInstruction(BlockEntryInstr* block, Instruction* instr); |
| void ConnectIncomingPhiMoves(BlockEntryInstr* block); |
| - void BlockLocation(Location loc, intptr_t from, intptr_t to); |
| + void BlockLocation(Location loc, intptr_t pos); |
| // Process live ranges sorted by their start and assign registers |
| // to them |