[maglev] Put stack slot reuse behind a flag

It is currently incorrect and causing issues, put it behind a flag so
that we can fix these issues while working on the rest of maglev in
parallel.

Bug: v8:7700
Change-Id: Idab7056db1236366410c30c06473016842aee5ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748659
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81612}
This commit is contained in:
Leszek Swirski 2022-07-08 15:45:36 +02:00 committed by V8 LUCI CQ
parent 871ed8cf08
commit 9a54561183
2 changed files with 3 additions and 1 deletions

View File

@ -509,6 +509,8 @@ DEFINE_BOOL(future, FUTURE_BOOL,
DEFINE_BOOL(maglev, false, "enable the maglev optimizing compiler")
DEFINE_BOOL(maglev_inlining, false,
"enable inlining in the maglev optimizing compiler")
DEFINE_BOOL(maglev_reuse_stack_slots, false,
"reuse stack slots in the maglev optimizing compiler")
#else
#define V8_ENABLE_MAGLEV_BOOL false
DEFINE_BOOL_READONLY(maglev, false, "enable the maglev optimizing compiler")

View File

@ -1085,7 +1085,7 @@ void StraightForwardRegisterAllocator::AllocateSpillSlot(ValueNode* node) {
// architectures.
SpillSlots& slots = is_tagged ? tagged_ : untagged_;
MachineRepresentation representation = node->GetMachineRepresentation();
if (slots.free_slots.empty()) {
if (!FLAG_maglev_reuse_stack_slots || slots.free_slots.empty()) {
free_slot = slots.top++;
} else {
NodeIdT start = node->live_range().start;