Commit 1e3e6969 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: [maglev] Implement Maglev-to-Turbofan OSR

Port ed90ea5c

Original Commit Message:

    This implementation sticks closely to what Ignition-to-Turbofan (and now
    Sparkplug-to-TF) does. OSR is detected in the TieringManager by having
    optimized code available, without having entered it. The osr_urgency is
    increased to enable OSR for increasing loop depths. When a candidate
    JumpLoop backedge is reached, we call into runtime to trigger OSR
    compilation.

    JumpLoop also detects the availability of cached OSR'd code. When a
    matching OSR code object is available, Maglev 1) deoptimizes s.t. the
    unoptimized frame layout is reconstructed, and 2) delegates the actual
    OSR tierup to the unoptimized tier. For purposes of 1), we add a new
    DeoptimizeReason that causes a one-time eager deopt without invalidating
    any code.

    into a generic spot that both SP and ML can use.

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I2de3ef530b9d1aac97e499fee75716a958cd9d09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863277
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#82827}
parent 9a5776c0
......@@ -1951,7 +1951,7 @@ void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) {
}
void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
using D = InterpreterOnStackReplacementDescriptor;
using D = OnStackReplacementDescriptor;
static_assert(D::kParameterCount == 1);
OnStackReplacement(masm, OsrSourceTier::kInterpreter,
D::MaybeTargetCodeRegister());
......@@ -1959,7 +1959,7 @@ void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
#if ENABLE_SPARKPLUG
void Builtins::Generate_BaselineOnStackReplacement(MacroAssembler* masm) {
using D = BaselineOnStackReplacementDescriptor;
using D = OnStackReplacementDescriptor;
static_assert(D::kParameterCount == 1);
__ LoadU64(kContextRegister,
......
......@@ -3733,7 +3733,7 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
}
void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
using D = InterpreterOnStackReplacementDescriptor;
using D = OnStackReplacementDescriptor;
static_assert(D::kParameterCount == 1);
OnStackReplacement(masm, OsrSourceTier::kInterpreter,
D::MaybeTargetCodeRegister());
......@@ -3741,7 +3741,7 @@ void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
#if ENABLE_SPARKPLUG
void Builtins::Generate_BaselineOnStackReplacement(MacroAssembler* masm) {
using D = BaselineOnStackReplacementDescriptor;
using D = OnStackReplacementDescriptor;
static_assert(D::kParameterCount == 1);
__ LoadU64(kContextRegister,
......
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