LiveRange::LiveRange(int id)
: id_(id),
spilled_(false),
+ is_double_(false),
assigned_register_(kInvalidAssignment),
- assigned_register_kind_(NONE),
last_interval_(NULL),
first_interval_(NULL),
first_pos_(NULL),
void LiveRange::set_assigned_register(int reg, RegisterKind register_kind) {
ASSERT(!HasRegisterAssigned() && !IsSpilled());
assigned_register_ = reg;
- assigned_register_kind_ = register_kind;
+ is_double_ = (register_kind == DOUBLE_REGISTERS);
ConvertOperands();
}
reusable_slots_(8),
next_virtual_register_(num_values),
first_artificial_register_(num_values),
- mode_(NONE),
+ mode_(GENERAL_REGISTERS),
num_registers_(-1),
graph_(graph),
has_osr_entry_(false) {}
void LAllocator::AllocateGeneralRegisters() {
HPhase phase("Allocate general registers", this);
num_registers_ = Register::kNumAllocatableRegisters;
- mode_ = GENERAL_REGISTERS;
AllocateRegisters();
}
void LAllocator::AllocateRegisters() {
- ASSERT(mode_ != NONE);
ASSERT(unhandled_live_ranges_.is_empty());
for (int i = 0; i < live_ranges_.length(); ++i) {
const char* LAllocator::RegisterName(int allocation_index) {
- ASSERT(mode_ != NONE);
if (mode_ == GENERAL_REGISTERS) {
return Register::AllocationIndexToString(allocation_index);
} else {
enum RegisterKind {
- NONE,
GENERAL_REGISTERS,
DOUBLE_REGISTERS
};
// live range to the result live range.
void SplitAt(LifetimePosition position, LiveRange* result);
- bool IsDouble() const { return assigned_register_kind_ == DOUBLE_REGISTERS; }
+ bool IsDouble() const { return is_double_; }
bool HasRegisterAssigned() const {
return assigned_register_ != kInvalidAssignment;
}
int id_;
bool spilled_;
+ bool is_double_;
int assigned_register_;
- RegisterKind assigned_register_kind_;
UseInterval* last_interval_;
UseInterval* first_interval_;
UsePosition* first_pos_;