| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_REGISTER_ALLOCATOR_H_ | 5 #ifndef V8_REGISTER_ALLOCATOR_H_ |
| 6 #define V8_REGISTER_ALLOCATOR_H_ | 6 #define V8_REGISTER_ALLOCATOR_H_ |
| 7 | 7 |
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
| 9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
| 10 #include "src/register-configuration.h" | 10 #include "src/register-configuration.h" |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 | 957 |
| 958 protected: | 958 protected: |
| 959 RegisterAllocationData* data() const { return data_; } | 959 RegisterAllocationData* data() const { return data_; } |
| 960 InstructionSequence* code() const { return data()->code(); } | 960 InstructionSequence* code() const { return data()->code(); } |
| 961 RegisterKind mode() const { return mode_; } | 961 RegisterKind mode() const { return mode_; } |
| 962 int num_registers() const { return num_registers_; } | 962 int num_registers() const { return num_registers_; } |
| 963 int num_allocatable_registers() const { return num_allocatable_registers_; } | 963 int num_allocatable_registers() const { return num_allocatable_registers_; } |
| 964 const int* allocatable_register_codes() const { | 964 const int* allocatable_register_codes() const { |
| 965 return allocatable_register_codes_; | 965 return allocatable_register_codes_; |
| 966 } | 966 } |
| 967 // Returns true if registers do not combine to form larger registers, i.e. | |
| 968 // no complex aliasing detection is required. This is always true for the | |
| 969 // general register pass, and true for the FP register pass except for arm | |
| 970 // and mips archs. | |
| 971 bool no_combining() const { return no_combining_; } | |
| 972 | 967 |
| 973 // TODO(mtrofin): explain why splitting in gap START is always OK. | 968 // TODO(mtrofin): explain why splitting in gap START is always OK. |
| 974 LifetimePosition GetSplitPositionForInstruction(const LiveRange* range, | 969 LifetimePosition GetSplitPositionForInstruction(const LiveRange* range, |
| 975 int instruction_index); | 970 int instruction_index); |
| 976 | 971 |
| 977 Zone* allocation_zone() const { return data()->allocation_zone(); } | 972 Zone* allocation_zone() const { return data()->allocation_zone(); } |
| 978 | 973 |
| 979 // Find the optimal split for ranges defined by a memory operand, e.g. | 974 // Find the optimal split for ranges defined by a memory operand, e.g. |
| 980 // constants or function parameters passed on the stack. | 975 // constants or function parameters passed on the stack. |
| 981 void SplitAndSpillRangesDefinedByMemoryOperand(bool operands_only); | 976 void SplitAndSpillRangesDefinedByMemoryOperand(bool operands_only); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 RegisterAllocationData* const data_; | 1176 RegisterAllocationData* const data_; |
| 1182 | 1177 |
| 1183 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); | 1178 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); |
| 1184 }; | 1179 }; |
| 1185 | 1180 |
| 1186 } // namespace compiler | 1181 } // namespace compiler |
| 1187 } // namespace internal | 1182 } // namespace internal |
| 1188 } // namespace v8 | 1183 } // namespace v8 |
| 1189 | 1184 |
| 1190 #endif // V8_REGISTER_ALLOCATOR_H_ | 1185 #endif // V8_REGISTER_ALLOCATOR_H_ |
| OLD | NEW |