mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: cherry-pick d5b0cb2acffe from v8 * chore: update patches --------- Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
51 lines
2.4 KiB
Diff
51 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Darius Mercadier <dmercadier@chromium.org>
|
|
Date: Wed, 25 Feb 2026 12:56:18 +0100
|
|
Subject: [M144 Merge] [maglev] fix CanElideWriteBarrier Smi recording for phis
|
|
|
|
Recording a Tagged use is not enough for 2 reasons:
|
|
|
|
* Tagged uses are sometimes ignored, in particular for loop phis
|
|
where we distinguish in-loop and out-of-loop uses.
|
|
|
|
* This Tagged use could only prevent untagging of this specific phi,
|
|
but none of its inputs. So we could have a Smi phi as input to the
|
|
current phi which gets untagged and retagged to a non-Smi, all
|
|
while the current phi doesn't get untagged.
|
|
|
|
(cherry picked from commit a54bf5cd45e5b119e2afe6019428e81c3d626fb3)
|
|
|
|
Change-Id: I9b3a2ea339f2c9d81dbb74a44425ba55d8c73871
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7604255
|
|
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
|
|
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
|
|
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
|
|
Cr-Original-Commit-Position: refs/heads/main@{#105444}
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7659106
|
|
Auto-Submit: Srinivas Sista <srinivassista@chromium.org>
|
|
Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
|
|
Commit-Queue: Srinivas Sista <srinivassista@chromium.org>
|
|
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
|
|
Owners-Override: Srinivas Sista <srinivassista@chromium.org>
|
|
Cr-Commit-Position: refs/branch-heads/14.4@{#64}
|
|
Cr-Branched-From: 80acc26727d5a34e77dabeebe7c9213ec1bd4768-refs/heads/14.4.258@{#1}
|
|
Cr-Branched-From: ce7e597e90f6df3fa4b6df224bc613b80c635450-refs/heads/main@{#104020}
|
|
|
|
diff --git a/src/maglev/maglev-graph-builder.cc b/src/maglev/maglev-graph-builder.cc
|
|
index bf6a5ab1b41d684c37dd96f7720474c6bb71a4db..c21a41d7da3394bb8f35857e0dcf49a78b218d31 100644
|
|
--- a/src/maglev/maglev-graph-builder.cc
|
|
+++ b/src/maglev/maglev-graph-builder.cc
|
|
@@ -4439,7 +4439,11 @@ bool MaglevGraphBuilder::CanElideWriteBarrier(ValueNode* object,
|
|
ValueNode* value) {
|
|
if (value->Is<RootConstant>() || value->Is<ConsStringMap>()) return true;
|
|
if (!IsEmptyNodeType(GetType(value)) && CheckType(value, NodeType::kSmi)) {
|
|
- value->MaybeRecordUseReprHint(UseRepresentation::kTagged);
|
|
+ if constexpr (SmiValuesAre31Bits()) {
|
|
+ if (Phi* value_as_phi = value->TryCast<Phi>()) {
|
|
+ value_as_phi->SetUseRequires31BitValue();
|
|
+ }
|
|
+ }
|
|
return true;
|
|
}
|
|
|