Commit bf8c3592 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[compiler] Avoid more accessors

Access private fields directly instead.

R=thibaudm@chromium.org

Bug: v8:12330
Change-Id: I2b52dc8a2d0a1ee3a87cf6bd24b145e5c7419770
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3380914Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78634}
parent 8de607d5
......@@ -2933,8 +2933,8 @@ void MidTierRegisterAllocator::AllocateRegisters(
bool is_deferred_block_boundary =
data_->block_state(block_rpo).is_deferred_block_boundary();
general_reg_allocator().StartBlock(block);
double_reg_allocator().StartBlock(block);
general_reg_allocator_.StartBlock(block);
double_reg_allocator_.StartBlock(block);
// If the block is not deferred but has deferred successors, then try to
// output spill slots for virtual_registers that are only spilled in the
......@@ -3008,10 +3008,10 @@ void MidTierRegisterAllocator::AllocateRegisters(
}
if (instr->ClobbersRegisters()) {
general_reg_allocator().SpillAllRegisters();
general_reg_allocator_.SpillAllRegisters();
}
if (instr->ClobbersDoubleRegisters()) {
double_reg_allocator().SpillAllRegisters();
double_reg_allocator_.SpillAllRegisters();
}
// Allocate temporaries.
......@@ -3055,8 +3055,8 @@ void MidTierRegisterAllocator::AllocateRegisters(
// If this block is deferred but it's successor isn't, update the state to
// limit spills to the deferred blocks where possible.
if (is_deferred_block_boundary && block->IsDeferred()) {
general_reg_allocator().UpdateForDeferredBlock(instr_index);
double_reg_allocator().UpdateForDeferredBlock(instr_index);
general_reg_allocator_.UpdateForDeferredBlock(instr_index);
double_reg_allocator_.UpdateForDeferredBlock(instr_index);
}
}
......@@ -3076,30 +3076,26 @@ void MidTierRegisterAllocator::AllocateRegisters(
}
}
general_reg_allocator().EndInstruction();
double_reg_allocator().EndInstruction();
general_reg_allocator_.EndInstruction();
double_reg_allocator_.EndInstruction();
}
// For now we spill all registers at a loop header.
// TODO(rmcilroy): Add support for register allocations across loops.
if (block->IsLoopHeader()) {
general_reg_allocator().SpillAllRegisters();
double_reg_allocator().SpillAllRegisters();
general_reg_allocator_.SpillAllRegisters();
double_reg_allocator_.SpillAllRegisters();
}
AllocatePhis(block);
general_reg_allocator().EndBlock(block);
double_reg_allocator().EndBlock(block);
general_reg_allocator_.EndBlock(block);
double_reg_allocator_.EndBlock(block);
}
SinglePassRegisterAllocator& MidTierRegisterAllocator::AllocatorFor(
MachineRepresentation rep) {
if (IsFloatingPoint(rep)) {
return double_reg_allocator();
} else {
return general_reg_allocator();
}
return IsFloatingPoint(rep) ? double_reg_allocator_ : general_reg_allocator_;
}
bool MidTierRegisterAllocator::IsFixedRegisterPolicy(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment