Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cherry-pick d0882b3dff76 from v8 (#34687)
* chore: [18-x-y] cherry-pick d0882b3dff76 from v8 * fix patch. * fix patch pt. 2 Co-authored-by: Electron Bot <electron@github.com> Co-authored-by: Pedro Pontes <pepontes@microsoft.com>
- Loading branch information
1 parent
76a07c2
commit 9e51cf4
Showing
2 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Tobias Tebbi <tebbi@chromium.org> | ||
Date: Fri, 10 Jun 2022 12:53:10 +0000 | ||
Subject: Version 10.2.154.10 (cherry-pick) | ||
|
||
Merged 85b4b5d719c50ecc8f376ca853c9001d5ac0ed9a | ||
|
||
[compiler] only enable MidTierRegisterAllocator for Wasm | ||
|
||
Bug: chromium:1335054 | ||
Change-Id: I61ab97d4fbfcbb81319e611a64a6454e050a1d65 | ||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3705397 | ||
Owners-Override: Tobias Tebbi <tebbi@chromium.org> | ||
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> | ||
Cr-Commit-Position: refs/branch-heads/10.2@{#18} | ||
Cr-Branched-From: 374091f382e88095694c1283cbdc2acddc1b1417-refs/heads/10.2.154@{#1} | ||
Cr-Branched-From: f0c353f6315eeb2212ba52478983a3b3af07b5b1-refs/heads/main@{#79976} | ||
|
||
diff --git a/include/v8-version.h b/include/v8-version.h | ||
index 7999dcb13f34b68d12660cdc0f6767e5e8bf6d18..ebd8289678fcf2d746e3a67a49c086058651fb28 100644 | ||
--- a/include/v8-version.h | ||
+++ b/include/v8-version.h | ||
@@ -11,7 +11,7 @@ | ||
#define V8_MAJOR_VERSION 10 | ||
#define V8_MINOR_VERSION 0 | ||
#define V8_BUILD_NUMBER 139 | ||
-#define V8_PATCH_LEVEL 17 | ||
+#define V8_PATCH_LEVEL 18 | ||
|
||
// Use 1 for candidates and 0 otherwise. | ||
// (Boolean macro values are not supported by all preprocessors.) | ||
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc | ||
index 6ea2df76c863ed0466ee96fcf1ad5736192c6b44..555942c2be2287d41d443d109e305c4858579447 100644 | ||
--- a/src/compiler/pipeline.cc | ||
+++ b/src/compiler/pipeline.cc | ||
@@ -3456,11 +3456,15 @@ bool PipelineImpl::SelectInstructions(Linkage* linkage) { | ||
|
||
const RegisterConfiguration* config = RegisterConfiguration::Default(); | ||
std::unique_ptr<const RegisterConfiguration> restricted_config; | ||
+ // The mid-tier register allocator keeps values in stack slots for too long. | ||
+ // This is incompatible with left-trimming, therefore we cannot enable it for | ||
+ // JS functions. | ||
bool use_mid_tier_register_allocator = | ||
- FLAG_turbo_force_mid_tier_regalloc || | ||
+ data->info()->code_kind() == CodeKind::WASM_FUNCTION && | ||
+ (FLAG_turbo_force_mid_tier_regalloc || | ||
(FLAG_turbo_use_mid_tier_regalloc_for_huge_functions && | ||
data->sequence()->VirtualRegisterCount() > | ||
- kTopTierVirtualRegistersLimit); | ||
+ kTopTierVirtualRegistersLimit)); | ||
|
||
if (call_descriptor->HasRestrictedAllocatableRegisters()) { | ||
RegList registers = call_descriptor->AllocatableRegisters(); |