Commit ceb0bea5 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[WIP][deoptimizer] Accept kCompressed as state value input

Change-Id: Ie09953d0b9453a1f22312ad1782e2c41b8230679
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533858Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60435}
parent f43b45a1
......@@ -1093,7 +1093,12 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
} else if (type == MachineType::Int64()) {
translation->StoreInt64StackSlot(LocationOperand::cast(op)->index());
} else {
CHECK_EQ(MachineRepresentation::kTagged, type.representation());
#if defined(V8_COMPRESS_POINTERS)
CHECK(MachineRepresentation::kTagged == type.representation() ||
MachineRepresentation::kCompressed == type.representation());
#else
CHECK(MachineRepresentation::kTagged == type.representation());
#endif
translation->StoreStackSlot(LocationOperand::cast(op)->index());
}
} else if (op->IsFPStackSlot()) {
......@@ -1116,7 +1121,12 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
} else if (type == MachineType::Int64()) {
translation->StoreInt64Register(converter.ToRegister(op));
} else {
CHECK_EQ(MachineRepresentation::kTagged, type.representation());
#if defined(V8_COMPRESS_POINTERS)
CHECK(MachineRepresentation::kTagged == type.representation() ||
MachineRepresentation::kCompressed == type.representation());
#else
CHECK(MachineRepresentation::kTagged == type.representation());
#endif
translation->StoreRegister(converter.ToRegister(op));
}
} else if (op->IsFPRegister()) {
......
......@@ -3072,13 +3072,19 @@ int TranslatedState::CreateNextTranslatedValue(
return translated_value.GetChildrenCount();
}
intptr_t value = registers->GetRegister(input_reg);
#if defined(V8_COMPRESS_POINTERS)
Address uncompressed_value = DecompressTaggedAny(
isolate()->isolate_root(), static_cast<uint32_t>(value));
#else
Address uncompressed_value = value;
#endif
if (trace_file != nullptr) {
PrintF(trace_file, V8PRIxPTR_FMT " ; %s ", value,
PrintF(trace_file, V8PRIxPTR_FMT " ; %s ", uncompressed_value,
converter.NameOfCPURegister(input_reg));
Object(value)->ShortPrint(trace_file);
Object(uncompressed_value)->ShortPrint(trace_file);
}
TranslatedValue translated_value =
TranslatedValue::NewTagged(this, Object(value));
TranslatedValue::NewTagged(this, Object(uncompressed_value));
frame.Add(translated_value);
return translated_value.GetChildrenCount();
}
......@@ -3194,13 +3200,20 @@ int TranslatedState::CreateNextTranslatedValue(
int slot_offset =
OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next());
intptr_t value = *(reinterpret_cast<intptr_t*>(fp + slot_offset));
#if defined(V8_COMPRESS_POINTERS)
Address uncompressed_value = DecompressTaggedAny(
isolate()->isolate_root(), static_cast<uint32_t>(value));
#else
Address uncompressed_value = value;
#endif
if (trace_file != nullptr) {
PrintF(trace_file, V8PRIxPTR_FMT " ; [fp %c %3d] ", value,
slot_offset < 0 ? '-' : '+', std::abs(slot_offset));
Object(value)->ShortPrint(trace_file);
PrintF(trace_file, V8PRIxPTR_FMT " ; [fp %c %3d] ",
uncompressed_value, slot_offset < 0 ? '-' : '+',
std::abs(slot_offset));
Object(uncompressed_value)->ShortPrint(trace_file);
}
TranslatedValue translated_value =
TranslatedValue::NewTagged(this, Object(value));
TranslatedValue::NewTagged(this, Object(uncompressed_value));
frame.Add(translated_value);
return translated_value.GetChildrenCount();
}
......
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