Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: src/compiler/register-allocator-verifier.cc

Issue 2205093002: [Turbofan] Make RegisterAllocatorVerifier tolerant of shared slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix fixed slots. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/register-allocator-verifier.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator-verifier.cc
diff --git a/src/compiler/register-allocator-verifier.cc b/src/compiler/register-allocator-verifier.cc
index 2d10de081c5d9abaf0d095520ef61ebb0859cc28..cefd04af1faeffdfc4b2cc8a7934a0248d2508cd 100644
--- a/src/compiler/register-allocator-verifier.cc
+++ b/src/compiler/register-allocator-verifier.cc
@@ -160,7 +160,7 @@ void RegisterAllocatorVerifier::BuildConstraint(const InstructionOperand* op,
int vreg = unallocated->virtual_register();
constraint->virtual_register_ = vreg;
if (unallocated->basic_policy() == UnallocatedOperand::FIXED_SLOT) {
- constraint->type_ = sequence()->IsFP(vreg) ? kFPSlot : kSlot;
+ constraint->type_ = kFixedSlot;
constraint->value_ = unallocated->fixed_slot_index();
} else {
switch (unallocated->extended_policy()) {
@@ -193,7 +193,9 @@ void RegisterAllocatorVerifier::BuildConstraint(const InstructionOperand* op,
}
break;
case UnallocatedOperand::MUST_HAVE_SLOT:
- constraint->type_ = sequence()->IsFP(vreg) ? kFPSlot : kSlot;
+ constraint->type_ = kSlot;
+ constraint->value_ =
+ ElementSizeLog2Of(sequence()->GetRepresentation(vreg));
break;
case UnallocatedOperand::SAME_AS_FIRST_INPUT:
constraint->type_ = kSameAsFirst;
@@ -239,14 +241,13 @@ void RegisterAllocatorVerifier::CheckConstraint(
CHECK_EQ(LocationOperand::cast(op)->register_code(), constraint->value_);
return;
case kFixedSlot:
- CHECK(op->IsStackSlot());
+ CHECK(op->IsStackSlot() || op->IsFPStackSlot());
CHECK_EQ(LocationOperand::cast(op)->index(), constraint->value_);
return;
case kSlot:
- CHECK(op->IsStackSlot());
- return;
- case kFPSlot:
- CHECK(op->IsFPStackSlot());
+ CHECK(op->IsStackSlot() || op->IsFPStackSlot());
+ CHECK_EQ(ElementSizeLog2Of(LocationOperand::cast(op)->representation()),
+ constraint->value_);
return;
case kNone:
CHECK(op->IsRegister() || op->IsStackSlot());
« no previous file with comments | « src/compiler/register-allocator-verifier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698