[S] Change in dart/sdk[main]: [modular_aot] Fix live ranges of non-fixed temps, fix serialization o...

0 views
Skip to first unread message

Alexander Markov (Gerrit)

unread,
Mar 9, 2026, 2:32:39 PM (13 hours ago) Mar 9
to Alexander Markov, Slava Egorov, Alexander Aprelev, Tess Strickland, Nate Biggs, Nicholas Shahan, Stephen Adams, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Slava Egorov

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Slava Egorov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia9919218e473979529c8af48480a09adc1659b1d
Gerrit-Change-Number: 486540
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Slava Egorov <veg...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 18:32:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Slava Egorov (Gerrit)

unread,
Mar 9, 2026, 3:07:50 PM (12 hours ago) Mar 9
to Alexander Markov, Alexander Aprelev, Tess Strickland, Nate Biggs, Nicholas Shahan, Stephen Adams, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Alexander Markov

Slava Egorov added 1 comment

File pkg/native_compiler/testcases/unboxing_test.dart.expect
Line 34, Patchset 1 (Latest): v30 = BoxInt(v24) # RA: R1 <- (R1) temps: [R0, R2, R3]
Slava Egorov . unresolved

This is suspect because `BoxInt` uses:

```
_asm.adds(resultReg, operandReg, operandReg);
```

so it is destroying the original value in R1.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia9919218e473979529c8af48480a09adc1659b1d
Gerrit-Change-Number: 486540
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 19:07:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Mar 9, 2026, 3:26:05 PM (12 hours ago) Mar 9
to Alexander Markov, Slava Egorov, Alexander Aprelev, Tess Strickland, Nate Biggs, Nicholas Shahan, Stephen Adams, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Slava Egorov

Alexander Markov added 1 comment

File pkg/native_compiler/testcases/unboxing_test.dart.expect
Line 34, Patchset 1 (Latest): v30 = BoxInt(v24) # RA: R1 <- (R1) temps: [R0, R2, R3]
Slava Egorov . unresolved

This is suspect because `BoxInt` uses:

```
_asm.adds(resultReg, operandReg, operandReg);
```

so it is destroying the original value in R1.

Alexander Markov

Nice catch! We currently have no interference between inputs and output of the instruction, so they are allowed to be allocated to the same register (if input is not live after this instruction). I'll check and fix codegen in the follow-up.

Open in Gerrit

Related details

Attention is currently required from:
  • Slava Egorov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia9919218e473979529c8af48480a09adc1659b1d
Gerrit-Change-Number: 486540
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Slava Egorov <veg...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 19:26:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Slava Egorov <veg...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Slava Egorov (Gerrit)

unread,
Mar 9, 2026, 3:31:37 PM (12 hours ago) Mar 9
to Alexander Markov, Alexander Aprelev, Tess Strickland, Nate Biggs, Nicholas Shahan, Stephen Adams, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Alexander Markov

Slava Egorov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia9919218e473979529c8af48480a09adc1659b1d
Gerrit-Change-Number: 486540
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 19:31:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Mar 9, 2026, 3:38:50 PM (11 hours ago) Mar 9
to Alexander Markov, Slava Egorov, Alexander Aprelev, Tess Strickland, Nate Biggs, Nicholas Shahan, Stephen Adams, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org

Alexander Markov voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia9919218e473979529c8af48480a09adc1659b1d
Gerrit-Change-Number: 486540
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 19:38:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Mar 9, 2026, 4:02:07 PM (11 hours ago) Mar 9
to Alexander Markov, Slava Egorov, Alexander Aprelev, Tess Strickland, Nate Biggs, Nicholas Shahan, Stephen Adams, rev...@dartlang.org, vm-...@dartlang.org

Commit Queue submitted the change

Change information

Commit message:
[modular_aot] Fix live ranges of non-fixed temps, fix serialization of two-byte strings

* Live ranges of non-fixed register temporaries should interfere both
with live ranges of inputs and outputs.

* When serializing a two-byte (non-Latin1) strings, ensure that
characters in the data section are aligned by 2.
However, already written data in the serialization buffer
may be misaligned (as we're writing to a series of buffers), so
write each code unit as separate bytes instead of writing them as
Uint16List.

TEST=ci
Change-Id: Ia9919218e473979529c8af48480a09adc1659b1d
Reviewed-by: Slava Egorov <veg...@google.com>
Commit-Queue: Alexander Markov <alexm...@google.com>
Files:
  • M pkg/native_compiler/lib/back_end/register_allocator.dart
  • M pkg/native_compiler/lib/snapshot/snapshot.dart
  • M pkg/native_compiler/testcases/unboxing_test.dart.expect
  • M runtime/vm/module_snapshot.cc
Change size: S
Delta: 4 files changed, 14 insertions(+), 10 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Slava Egorov
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia9919218e473979529c8af48480a09adc1659b1d
Gerrit-Change-Number: 486540
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages