Skip to content

[RISC-V] Use auipc for code addresses in INS_OPTS_C - #117196

Merged
jakobbotsch merged 7 commits into
dotnet:mainfrom
tomeksowi:auipc-in-EmitOutputCall
Aug 4, 2025
Merged

[RISC-V] Use auipc for code addresses in INS_OPTS_C#117196
jakobbotsch merged 7 commits into
dotnet:mainfrom
tomeksowi:auipc-in-EmitOutputCall

Conversation

@tomeksowi

@tomeksowitomeksowi commented Jul 1, 2025

Copy link
Copy Markdown
Member

Simplify emitter around INS_OPTS_C, similar to #116780.

Always emit relocation, it leaves the door open for further code size reductions like arm64, by emitting a single jal instruction and inserting a jump stub if the offset doesn't fit in its immediate.

Part of #84834, cc @dotnet/samsung

@github-actionsgithub-actionsBot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 1, 2025
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Jul 1, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@risc-vv

risc-vv commented Jul 1, 2025

Copy link
Copy Markdown
RISC-V Release-CLR-VF2: 9078 / 9108 (99.67%)
=======================
passed: 9078
failed: 2
skipped: 599
killed: 28
------------------------
TOTAL tests: 9707
VIRTUAL time: 10h 25min 7s 475ms
REAL time: 42min 27s 581ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-CLR-QEMU: 9078 / 9108 (99.67%)
=======================
passed: 9078
failed: 2
skipped: 600
killed: 28
------------------------
TOTAL tests: 9708
VIRTUAL time: 35h 23min 41s 787ms
REAL time: 36min 5s 65ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-FX-QEMU: 229136 / 230217 (99.53%)
=======================
passed: 229136
failed: 1073
skipped: 39
killed: 8
------------------------
TOTAL tests: 230256
VIRTUAL time: 30h 12min 52s 318ms
REAL time: 1h 10min 57s 734ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-FX-VF2: 445080 / 446735 (99.63%)
=======================
passed: 445080
failed: 1639
skipped: 39
killed: 16
------------------------
TOTAL tests: 446774
VIRTUAL time: 21h 9min 49s 95ms
REAL time: 2h 3min 38s 785ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

Build information and commands

GIT: 74139927a9cecba242d897b4518a0db2523c6b79
CI: 8669404f3505d3b0b74fcc8f425a1ff735d746cc
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@tomeksowi

Copy link
Copy Markdown
MemberAuthor

No regressions.

Diffs are based on 36,155 contexts (12,724 MinOpts, 23,431 FullOpts).

Overall (-1,100,312 bytes)
CollectionBase size (bytes)Diff size (bytes)PerfScore in Diffs
linux.riscv64.Checked.3.mch44,453,752-1,100,312-5.01%
MinOpts (-801,132 bytes)
CollectionBase size (bytes)Diff size (bytes)PerfScore in Diffs
linux.riscv64.Checked.3.mch26,497,332-801,132-5.51%
FullOpts (-299,180 bytes)
CollectionBase size (bytes)Diff size (bytes)PerfScore in Diffs
linux.riscv64.Checked.3.mch17,956,420-299,180-4.63%
Example diffs
linux.riscv64.Checked.3.mch
-48 (-42.86%) : 15058.dasm - System.Xaml.Permissions.XamlAccessLevel:.ctor(System.String,System.String):this (FullOpts)
@@ -28,38 +28,26 @@ G_M24084_IG02: ; bbWeight=1, gcrefRegs=1C00 {a0 a1 a2}, byrefRegs=0000 {}
; byrRegs +[t3]
mv t4, a1
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF
; gcrRegs -[a1 t4]
; byrRegs -[t3]
addi t3, a0, 0xD1FFAB1E
; byrRegs +[t3]
mv t4, a2
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF- ; gcrRegs -[a0 a2 t4]+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF+ ; gcrRegs -[a0 a2 t4] +[s1]
; byrRegs -[t3]
- ;; size=80 bbWeight=1 PerfScore 22.00+ ;; size=32 bbWeight=1 PerfScore 10.00
G_M24084_IG03: ; bbWeight=1, epilog, nogc, extend
ld ra, 8(sp)
ld fp, 0(sp)
addi sp, sp, 16
ret ;; size=16 bbWeight=1 PerfScore 7.50
-; Total bytes of code 112, prolog size 16, PerfScore 38.50, instruction count 14, allocated bytes for code 112 (MethodHash=4f95a1eb) for method System.Xaml.Permissions.XamlAccessLevel:.ctor(System.String,System.String):this (FullOpts)+; Total bytes of code 64, prolog size 16, PerfScore 26.50, instruction count 14, allocated bytes for code 64 (MethodHash=4f95a1eb) for method System.Xaml.Permissions.XamlAccessLevel:.ctor(System.String,System.String):this (FullOpts)
; ============================================================
Unwind Info:
@@ -70,7 +58,7 @@ Unwind Info:
E bit : 0
X bit : 0
Vers : 0
- Function Length : 28 (0x0001c) Actual length = 112 (0x000070)+ Function Length : 16 (0x00010) Actual length = 64 (0x000040)
---- Epilog scopes ----
---- Scope 0
Epilog Start Offset : 3523193630 (0xd1ffab1e) Actual offset = 3523193630 (0xd1ffab1e) Offset from main function begin = 3523193630 (0xd1ffab1e)
-48 (-42.86%) : 25538.dasm - R2RDump.R2RDiff+MethodPair:.ctor(ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod,ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod):this (FullOpts)
@@ -28,38 +28,26 @@ G_M5636_IG02: ; bbWeight=1, gcrefRegs=1800 {a1 a2}, byrefRegs=0400 {a0},
; byrRegs +[t3]
mv t4, a1
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_CHECKED_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_CHECKED_ASSIGN_REF
; gcrRegs -[a1 t4]
; byrRegs -[t3]
addi t3, a0, 0xD1FFAB1E
; byrRegs +[t3]
mv t4, a2
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_CHECKED_ASSIGN_REF- ; gcrRegs -[a2 t4]+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_CHECKED_ASSIGN_REF+ ; gcrRegs -[a2 t4] +[s1]
; byrRegs -[a0 t3]
- ;; size=80 bbWeight=1 PerfScore 22.00+ ;; size=32 bbWeight=1 PerfScore 10.00
G_M5636_IG03: ; bbWeight=1, epilog, nogc, extend
ld ra, 8(sp)
ld fp, 0(sp)
addi sp, sp, 16
ret ;; size=16 bbWeight=1 PerfScore 7.50
-; Total bytes of code 112, prolog size 16, PerfScore 38.50, instruction count 14, allocated bytes for code 112 (MethodHash=c604e9fb) for method R2RDump.R2RDiff+MethodPair:.ctor(ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod,ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod):this (FullOpts)+; Total bytes of code 64, prolog size 16, PerfScore 26.50, instruction count 14, allocated bytes for code 64 (MethodHash=c604e9fb) for method R2RDump.R2RDiff+MethodPair:.ctor(ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod,ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod):this (FullOpts)
; ============================================================
Unwind Info:
@@ -70,7 +58,7 @@ Unwind Info:
E bit : 0
X bit : 0
Vers : 0
- Function Length : 28 (0x0001c) Actual length = 112 (0x000070)+ Function Length : 16 (0x00010) Actual length = 64 (0x000040)
---- Epilog scopes ----
---- Scope 0
Epilog Start Offset : 3523193630 (0xd1ffab1e) Actual offset = 3523193630 (0xd1ffab1e) Offset from main function begin = 3523193630 (0xd1ffab1e)
-48 (-42.86%) : 36055.dasm - Microsoft.Diagnostics.Tracing.ZippedETLReader:.ctor(System.String,System.IO.TextWriter):this (FullOpts)
@@ -28,38 +28,26 @@ G_M29914_IG02: ; bbWeight=1, gcrefRegs=1C00 {a0 a1 a2}, byrefRegs=0000 {}
; byrRegs +[t3]
mv t4, a1
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF
; gcrRegs -[a1 t4]
; byrRegs -[t3]
addi t3, a0, 0xD1FFAB1E
; byrRegs +[t3]
mv t4, a2
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF- ; gcrRegs -[a0 a2 t4]+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF+ ; gcrRegs -[a0 a2 t4] +[s1]
; byrRegs -[t3]
- ;; size=80 bbWeight=1 PerfScore 22.00+ ;; size=32 bbWeight=1 PerfScore 10.00
G_M29914_IG03: ; bbWeight=1, epilog, nogc, extend
ld ra, 8(sp)
ld fp, 0(sp)
addi sp, sp, 16
ret ;; size=16 bbWeight=1 PerfScore 7.50
-; Total bytes of code 112, prolog size 16, PerfScore 38.50, instruction count 14, allocated bytes for code 112 (MethodHash=58a88b25) for method Microsoft.Diagnostics.Tracing.ZippedETLReader:.ctor(System.String,System.IO.TextWriter):this (FullOpts)+; Total bytes of code 64, prolog size 16, PerfScore 26.50, instruction count 14, allocated bytes for code 64 (MethodHash=58a88b25) for method Microsoft.Diagnostics.Tracing.ZippedETLReader:.ctor(System.String,System.IO.TextWriter):this (FullOpts)
; ============================================================
Unwind Info:
@@ -70,7 +58,7 @@ Unwind Info:
E bit : 0
X bit : 0
Vers : 0
- Function Length : 28 (0x0001c) Actual length = 112 (0x000070)+ Function Length : 16 (0x00010) Actual length = 64 (0x000040)
---- Epilog scopes ----
---- Scope 0
Epilog Start Offset : 3523193630 (0xd1ffab1e) Actual offset = 3523193630 (0xd1ffab1e) Offset from main function begin = 3523193630 (0xd1ffab1e)
+0 (0.00%) : 35584.dasm - Microsoft.Diagnostics.Tracing.ThreadTimeStackComputer:OnThreadEnd(Microsoft.Diagnostics.Tracing.Parsers.Kernel.ThreadTraceData):this (FullOpts)

No diffs found?

+0 (0.00%) : 35568.dasm - Microsoft.Diagnostics.Tracing.StartStopActivity:GetActivityStack(Microsoft.Diagnostics.Tracing.Stacks.MutableTraceEventStackSource,int):int:this (FullOpts)

No diffs found?

+0 (0.00%) : 35344.dasm - Microsoft.Diagnostics.Utilities.FileUtilities:ForceDelete(System.String):bool (FullOpts)

No diffs found?

Details

Size improvements/regressions per collection

CollectionContexts with diffsImprovementsRegressionsSame sizeImprovements (bytes)Regressions (bytes)
linux.riscv64.Checked.3.mch9,3357,82501,510-1,100,312+0

PerfScore improvements/regressions per collection

CollectionContexts with diffsImprovementsRegressionsSame PerfScoreImprovements (PerfScore)Regressions (PerfScore)PerfScore Overall in FullOpts
linux.riscv64.Checked.3.mch9,3357,52001,815-6.18%0.00%-1.0691%

Context information

CollectionDiffed contextsMinOptsFullOptsMissed, baseMissed, diff
linux.riscv64.Checked.3.mch36,15512,72423,4310 (0.00%)0 (0.00%)

jit-analyze output

@tomeksowi

Copy link
Copy Markdown
MemberAuthor
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF- ; gcrRegs -[a0 a2 t4]+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF+ ; gcrRegs -[a0 a2 t4] +[s1]
; byrRegs -[t3]

Didn't expect GC info diffs here, will check tomorrow.

@tomeksowi
tomeksowi marked this pull request as draft July 1, 2025 14:31
@am11am11 added the arch-riscv Related to the RISC-V architecture label Jul 1, 2025
@risc-vv

risc-vv commented Jul 2, 2025

Copy link
Copy Markdown
RISC-V Release-CLR-QEMU: 9086 / 9116 (99.67%)
=======================
passed: 9086
failed: 2
skipped: 600
killed: 28
------------------------
TOTAL tests: 9716
VIRTUAL time: 35h 18min 55s 163ms
REAL time: 36min 8s 895ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-CLR-VF2: 9087 / 9117 (99.67%)
=======================
passed: 9087
failed: 2
skipped: 600
killed: 28
------------------------
TOTAL tests: 9717
VIRTUAL time: 10h 51min 39s 226ms
REAL time: 44min 4s 350ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-FX-QEMU: 283583 / 284654 (99.62%)
=======================
passed: 283583
failed: 1065
skipped: 39
killed: 6
------------------------
TOTAL tests: 284693
VIRTUAL time: 30h 8min 59s 226ms
REAL time: 1h 10min 56s 537ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-FX-VF2: 308690 / 310439 (99.44%)
=======================
passed: 308690
failed: 1741
skipped: 39
killed: 8
------------------------
TOTAL tests: 310478
VIRTUAL time: 22h 32min 47s 80ms
REAL time: 2h 15min 10s 243ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

Build information and commands

GIT: 8d5e6123e442a88b34837e6c3a70fa96d50c0070
CI: d1dbc286362becfc4b96e5e24e1bce76bd94ab28
REPO: tomeksowi/runtime
BRANCH: auipc-in-EmitOutputCall
CONFIG: Release
LIB_CONFIG: Release

@tomeksowi

Copy link
Copy Markdown
MemberAuthor

No regressions or GC diffs.

Diffs are based on 36,155 contexts (12,724 MinOpts, 23,431 FullOpts).

Overall (-1,100,312 bytes)
CollectionBase size (bytes)Diff size (bytes)PerfScore in Diffs
linux.riscv64.Checked.3.mch44,453,752-1,100,312-5.01%
MinOpts (-801,132 bytes)
CollectionBase size (bytes)Diff size (bytes)PerfScore in Diffs
linux.riscv64.Checked.3.mch26,497,332-801,132-5.52%
FullOpts (-299,180 bytes)
CollectionBase size (bytes)Diff size (bytes)PerfScore in Diffs
linux.riscv64.Checked.3.mch17,956,420-299,180-4.63%
Example diffs
linux.riscv64.Checked.3.mch
-48 (-42.86%) : 15058.dasm - System.Xaml.Permissions.XamlAccessLevel:.ctor(System.String,System.String):this (FullOpts)
@@ -28,38 +28,26 @@ G_M24084_IG02: ; bbWeight=1, gcrefRegs=1C00 {a0 a1 a2}, byrefRegs=0000 {}
; byrRegs +[t3]
mv t4, a1
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF
; gcrRegs -[a1 t4]
; byrRegs -[t3]
addi t3, a0, 0xD1FFAB1E
; byrRegs +[t3]
mv t4, a2
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF
; gcrRegs -[a0 a2 t4]
; byrRegs -[t3]
- ;; size=80 bbWeight=1 PerfScore 22.00+ ;; size=32 bbWeight=1 PerfScore 10.00
G_M24084_IG03: ; bbWeight=1, epilog, nogc, extend
ld ra, 8(sp)
ld fp, 0(sp)
addi sp, sp, 16
ret ;; size=16 bbWeight=1 PerfScore 7.50
-; Total bytes of code 112, prolog size 16, PerfScore 38.50, instruction count 14, allocated bytes for code 112 (MethodHash=4f95a1eb) for method System.Xaml.Permissions.XamlAccessLevel:.ctor(System.String,System.String):this (FullOpts)+; Total bytes of code 64, prolog size 16, PerfScore 26.50, instruction count 14, allocated bytes for code 64 (MethodHash=4f95a1eb) for method System.Xaml.Permissions.XamlAccessLevel:.ctor(System.String,System.String):this (FullOpts)
; ============================================================
Unwind Info:
@@ -70,7 +58,7 @@ Unwind Info:
E bit : 0
X bit : 0
Vers : 0
- Function Length : 28 (0x0001c) Actual length = 112 (0x000070)+ Function Length : 16 (0x00010) Actual length = 64 (0x000040)
---- Epilog scopes ----
---- Scope 0
Epilog Start Offset : 3523193630 (0xd1ffab1e) Actual offset = 3523193630 (0xd1ffab1e) Offset from main function begin = 3523193630 (0xd1ffab1e)
-48 (-42.86%) : 25538.dasm - R2RDump.R2RDiff+MethodPair:.ctor(ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod,ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod):this (FullOpts)
@@ -28,38 +28,26 @@ G_M5636_IG02: ; bbWeight=1, gcrefRegs=1800 {a1 a2}, byrefRegs=0400 {a0},
; byrRegs +[t3]
mv t4, a1
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_CHECKED_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_CHECKED_ASSIGN_REF
; gcrRegs -[a1 t4]
; byrRegs -[t3]
addi t3, a0, 0xD1FFAB1E
; byrRegs +[t3]
mv t4, a2
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_CHECKED_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_CHECKED_ASSIGN_REF
; gcrRegs -[a2 t4]
; byrRegs -[a0 t3]
- ;; size=80 bbWeight=1 PerfScore 22.00+ ;; size=32 bbWeight=1 PerfScore 10.00
G_M5636_IG03: ; bbWeight=1, epilog, nogc, extend
ld ra, 8(sp)
ld fp, 0(sp)
addi sp, sp, 16
ret ;; size=16 bbWeight=1 PerfScore 7.50
-; Total bytes of code 112, prolog size 16, PerfScore 38.50, instruction count 14, allocated bytes for code 112 (MethodHash=c604e9fb) for method R2RDump.R2RDiff+MethodPair:.ctor(ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod,ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod):this (FullOpts)+; Total bytes of code 64, prolog size 16, PerfScore 26.50, instruction count 14, allocated bytes for code 64 (MethodHash=c604e9fb) for method R2RDump.R2RDiff+MethodPair:.ctor(ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod,ILCompiler.Reflection.ReadyToRun.ReadyToRunMethod):this (FullOpts)
; ============================================================
Unwind Info:
@@ -70,7 +58,7 @@ Unwind Info:
E bit : 0
X bit : 0
Vers : 0
- Function Length : 28 (0x0001c) Actual length = 112 (0x000070)+ Function Length : 16 (0x00010) Actual length = 64 (0x000040)
---- Epilog scopes ----
---- Scope 0
Epilog Start Offset : 3523193630 (0xd1ffab1e) Actual offset = 3523193630 (0xd1ffab1e) Offset from main function begin = 3523193630 (0xd1ffab1e)
-48 (-42.86%) : 36055.dasm - Microsoft.Diagnostics.Tracing.ZippedETLReader:.ctor(System.String,System.IO.TextWriter):this (FullOpts)
@@ -28,38 +28,26 @@ G_M29914_IG02: ; bbWeight=1, gcrefRegs=1C00 {a0 a1 a2}, byrefRegs=0000 {}
; byrRegs +[t3]
mv t4, a1
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF
; gcrRegs -[a1 t4]
; byrRegs -[t3]
addi t3, a0, 0xD1FFAB1E
; byrRegs +[t3]
mv t4, a2
; gcrRegs +[t4]
- lui t2, 0xD1FFAB1E- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 11- addi t2, t2, 0xD1FFAB1E- slli t2, t2, 10- jalr ra, 0xD1FFAB1E(t2) // CORINFO_HELP_ASSIGN_REF+ auipc ra, 0xD1FFAB1E+ jalr ra // CORINFO_HELP_ASSIGN_REF
; gcrRegs -[a0 a2 t4]
; byrRegs -[t3]
- ;; size=80 bbWeight=1 PerfScore 22.00+ ;; size=32 bbWeight=1 PerfScore 10.00
G_M29914_IG03: ; bbWeight=1, epilog, nogc, extend
ld ra, 8(sp)
ld fp, 0(sp)
addi sp, sp, 16
ret ;; size=16 bbWeight=1 PerfScore 7.50
-; Total bytes of code 112, prolog size 16, PerfScore 38.50, instruction count 14, allocated bytes for code 112 (MethodHash=58a88b25) for method Microsoft.Diagnostics.Tracing.ZippedETLReader:.ctor(System.String,System.IO.TextWriter):this (FullOpts)+; Total bytes of code 64, prolog size 16, PerfScore 26.50, instruction count 14, allocated bytes for code 64 (MethodHash=58a88b25) for method Microsoft.Diagnostics.Tracing.ZippedETLReader:.ctor(System.String,System.IO.TextWriter):this (FullOpts)
; ============================================================
Unwind Info:
@@ -70,7 +58,7 @@ Unwind Info:
E bit : 0
X bit : 0
Vers : 0
- Function Length : 28 (0x0001c) Actual length = 112 (0x000070)+ Function Length : 16 (0x00010) Actual length = 64 (0x000040)
---- Epilog scopes ----
---- Scope 0
Epilog Start Offset : 3523193630 (0xd1ffab1e) Actual offset = 3523193630 (0xd1ffab1e) Offset from main function begin = 3523193630 (0xd1ffab1e)
+0 (0.00%) : 35584.dasm - Microsoft.Diagnostics.Tracing.ThreadTimeStackComputer:OnThreadEnd(Microsoft.Diagnostics.Tracing.Parsers.Kernel.ThreadTraceData):this (FullOpts)

No diffs found?

+0 (0.00%) : 35568.dasm - Microsoft.Diagnostics.Tracing.StartStopActivity:GetActivityStack(Microsoft.Diagnostics.Tracing.Stacks.MutableTraceEventStackSource,int):int:this (FullOpts)

No diffs found?

+0 (0.00%) : 35344.dasm - Microsoft.Diagnostics.Utilities.FileUtilities:ForceDelete(System.String):bool (FullOpts)

No diffs found?

Details

Size improvements/regressions per collection

CollectionContexts with diffsImprovementsRegressionsSame sizeImprovements (bytes)Regressions (bytes)
linux.riscv64.Checked.3.mch9,3297,82501,504-1,100,312+0

PerfScore improvements/regressions per collection

CollectionContexts with diffsImprovementsRegressionsSame PerfScoreImprovements (PerfScore)Regressions (PerfScore)PerfScore Overall in FullOpts
linux.riscv64.Checked.3.mch9,3297,52001,809-6.18%0.00%-1.0691%

Context information

CollectionDiffed contextsMinOptsFullOptsMissed, baseMissed, diff
linux.riscv64.Checked.3.mch36,15512,72423,4310 (0.00%)0 (0.00%)

jit-analyze output

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@jakobbotsch, PTAL.

@jakobbotsch
jakobbotsch merged commit 35ffd43 into dotnet:mainAug 4, 2025
3fbaea00 added a commit to 3fbaea00/runtime that referenced this pull request Aug 4, 2025
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Sep 4, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@tomeksowi@risc-vv@JulieLeeMSFT@jakobbotsch@sirntar@am11