Index: src/compiler/register-allocator.h |
diff --git a/src/compiler/register-allocator.h b/src/compiler/register-allocator.h |
index 117ddedbcd2a586337b9f68aee239af3333d4c4c..6747b8d3053d5aa37e0f1cb77c3c1a8507d001e8 100644 |
--- a/src/compiler/register-allocator.h |
+++ b/src/compiler/register-allocator.h |
@@ -7,6 +7,7 @@ |
#include "src/compiler/instruction.h" |
#include "src/ostreams.h" |
+#include "src/register-configuration.h" |
#include "src/zone-containers.h" |
namespace v8 { |
@@ -241,15 +242,15 @@ class UsePosition final : public ZoneObject { |
void set_next(UsePosition* next) { next_ = next; } |
// For hinting only. |
- void set_assigned_register(int register_index) { |
- flags_ = AssignedRegisterField::update(flags_, register_index); |
+ void set_assigned_register(int register_code) { |
+ flags_ = AssignedRegisterField::update(flags_, register_code); |
} |
UsePositionHintType hint_type() const { |
return HintTypeField::decode(flags_); |
} |
bool HasHint() const; |
- bool HintRegister(int* register_index) const; |
+ bool HintRegister(int* register_code) const; |
void ResolveHint(UsePosition* use_pos); |
bool IsResolved() const { |
return hint_type() != UsePositionHintType::kUnresolved; |
@@ -666,9 +667,9 @@ class RegisterAllocationData final : public ZoneObject { |
// For hinting. |
int assigned_register() const { return assigned_register_; } |
- void set_assigned_register(int register_index) { |
+ void set_assigned_register(int register_code) { |
DCHECK_EQ(assigned_register_, kUnassignedRegister); |
- assigned_register_ = register_index; |
+ assigned_register_ = register_code; |
} |
void UnsetAssignedRegister() { assigned_register_ = kUnassignedRegister; } |
@@ -769,6 +770,8 @@ class RegisterAllocationData final : public ZoneObject { |
const char* const debug_name_; |
const RegisterConfiguration* const config_; |
PhiMap phi_map_; |
+ ZoneVector<int> allocatable_codes_; |
+ ZoneVector<int> allocatable_double_codes_; |
ZoneVector<BitVector*> live_in_sets_; |
ZoneVector<BitVector*> live_out_sets_; |
ZoneVector<TopLevelLiveRange*> live_ranges_; |
@@ -886,6 +889,10 @@ class RegisterAllocator : public ZoneObject { |
InstructionSequence* code() const { return data()->code(); } |
RegisterKind mode() const { return mode_; } |
int num_registers() const { return num_registers_; } |
+ int num_allocatable_registers() const { return num_allocatable_registers_; } |
+ int allocatable_register_code(int allocatable_index) const { |
+ return allocatable_register_codes_[allocatable_index]; |
+ } |
Zone* allocation_zone() const { return data()->allocation_zone(); } |
@@ -921,6 +928,8 @@ class RegisterAllocator : public ZoneObject { |
RegisterAllocationData* const data_; |
const RegisterKind mode_; |
const int num_registers_; |
+ int num_allocatable_registers_; |
+ const int* allocatable_register_codes_; |
DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); |
}; |