-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged: [maglev] Hard limit on inlining depth
Set a hard max inlining depth that also counts for small functions. (cherry picked from commit 9c6afe3) Change-Id: I46ff324f84f959c62052d83686832e7ded68a860 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4912944 Auto-Submit: Olivier Flückiger <[email protected]> Reviewed-by: Toon Verwaest <[email protected]> Commit-Queue: Toon Verwaest <[email protected]> Cr-Commit-Position: refs/branch-heads/11.9@{#2} Cr-Branched-From: 3eb7d73-refs/heads/11.9.169@{#1} Cr-Branched-From: 1a13bf9-refs/heads/main@{#90218}
- Loading branch information
Showing
3 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2023 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
// | ||
// Flags: --allow-natives-syntax | ||
|
||
// Triggers mutual inlining. | ||
function bar(x) { | ||
foo([]); | ||
} | ||
function foo(arr) { | ||
arr.forEach(bar); | ||
} | ||
|
||
foo([]); | ||
%PrepareFunctionForOptimization(foo); | ||
%PrepareFunctionForOptimization(bar); | ||
foo([]); | ||
bar([]); | ||
foo([]); | ||
%OptimizeFunctionOnNextCall(foo); | ||
foo([]); |