Chromium Code Reviews| Index: src/compiler/register-allocator.h |
| diff --git a/src/compiler/register-allocator.h b/src/compiler/register-allocator.h |
| index 40fafb1dcf7c5c92a163544a9cf73d4a217a06a9..7cd3f30d434d5e8babcb050bc4aad4eea962a73f 100644 |
| --- a/src/compiler/register-allocator.h |
| +++ b/src/compiler/register-allocator.h |
| @@ -186,12 +186,15 @@ class LiveRange FINAL : public ZoneObject { |
| UsePosition* first_pos() const { return first_pos_; } |
| LiveRange* parent() const { return parent_; } |
| LiveRange* TopLevel() { return (parent_ == NULL) ? this : parent_; } |
| + const LiveRange* TopLevel() const { |
| + return (parent_ == NULL) ? this : parent_; |
| + } |
| LiveRange* next() const { return next_; } |
| bool IsChild() const { return parent() != NULL; } |
| int id() const { return id_; } |
| bool IsFixed() const { return id_ < 0; } |
| bool IsEmpty() const { return first_interval() == NULL; } |
| - InstructionOperand* CreateAssignedOperand(Zone* zone); |
| + InstructionOperand* CreateAssignedOperand(Zone* zone) const; |
| int assigned_register() const { return assigned_register_; } |
| int spill_start_index() const { return spill_start_index_; } |
| void set_assigned_register(int reg, Zone* zone); |
| @@ -347,6 +350,8 @@ class RegisterAllocator BASE_EMBEDDED { |
| return fixed_double_live_ranges_; |
| } |
| InstructionSequence* code() const { return code_; } |
| + // This zone is for datastructures only needed during register allocation. |
| + Zone* zone() const { return zone_; } |
|
Jarin
2014/11/04 10:42:09
Since you already touching this, could you possibl
dcarney
2014/11/05 09:02:02
Done.
|
| private: |
| int GetVirtualRegister() { |
| @@ -366,9 +371,6 @@ class RegisterAllocator BASE_EMBEDDED { |
| // Returns the register kind required by the given virtual register. |
| RegisterKind RequiredRegisterKind(int virtual_register) const; |
| - // This zone is for datastructures only needed during register allocation. |
| - Zone* zone() const { return zone_; } |
| - |
| // This zone is for InstructionOperands and moves that live beyond register |
| // allocation. |
| Zone* code_zone() const { return code()->zone(); } |
| @@ -475,8 +477,10 @@ class RegisterAllocator BASE_EMBEDDED { |
| bool IsBlockBoundary(LifetimePosition pos); |
| // Helper methods for resolving control flow. |
| - void ResolveControlFlow(LiveRange* range, const InstructionBlock* block, |
| - const InstructionBlock* pred); |
| + void ResolveControlFlow(const InstructionBlock* block, |
| + const LiveRange* cur_cover, |
| + const InstructionBlock* pred, |
| + const LiveRange* pred_cover); |
| void SetLiveRangeAssignedRegister(LiveRange* range, int reg); |