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

Port ed90ea5cf7

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: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#82827}
This commit is contained in:
Milad Fa 2022-08-30 09:36:04 -04:00 committed by V8 LUCI CQ
parent 9a5776c0be
commit 1e3e696960
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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,