Skip to content

[Superseded by #2530] fix(ssa): preserve synthetic debug locations - #2529

Closed
cpunion wants to merge 3 commits into
xgo-dev:mainfrom
cpunion:codex/fix-synthetic-debug-location-20260908
Closed

cpunion wants to merge 3 commits into
xgo-dev:mainfrom
cpunion:codex/fix-synthetic-debug-location-20260908

Conversation

@cpunion

@cpunion cpunion commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Consolidated into #2530, which includes these commits, regression tests, and review fixes together with the dependent local-stack allocation fix. Please review the combined contribution and its current CI there; the results below are retained as historical evidence.

Problem

Synthetic builders may not have a current source location even when their function has a DISubprogram. The LLVM binding explicitly requires a location to have been set before calling GetCurrentDebugLocation; deferInitBuilder violated that precondition and crashed in LLVMGoGetCurrentDebugLocation during CI.

Other synthetic calls in debug-enabled functions failed LLVM verification: an inlinable call must have a !dbg location. The expanded macOS LTO checks exposed this for os.(*root).decref. The affected code exists on upstream main be23e488a; this PR contains no unrelated runtime changes.

Fix

  • Track explicitly assigned source locations in the Go builder instead of reading a potentially unset LLVM location.
  • Initialize synthetic builders in debug-enabled functions with a line-zero function location, denoting generated code without inventing a source line.
  • Preserve the originating source location for generated defer setup when available.

Validation

  • The full SSA suite passed in the recorded integration tests; focused tests also pass on this main-based branch.
  • Regressions cover builders created before/after debug initialization, debug-disabled functions, exact source-location inheritance, and LLVM verification of an inlinable synthetic call.
  • Native fixture tests built with debug info passed in the recorded integration tests.
  • The three failing macOS LTO cases advance past the original LLVM verifier error locally. Final local linking is blocked by this machine's LLVM 22 plugin / LLD 23 mismatch; this is not counted as an end-to-end pass. Matching LLVM 22 CI remains required.

This contribution replaces fork PR cpunion/llgo#245. Per request, the remaining fork CI is cancelled and verification continues in this upstream PR; the fork CI is not claimed as passing. No debug-info disabling or LLVM dependency replacement is used.

Why earlier CI did not expose this

The affected path needs debug metadata plus a synthetic builder that either has no current location or emits an inlinable generated call checked by LLVM verification/LTO. Earlier completed WASM startup and release lanes did not combine those conditions, and shallower compilation failures could stop before this verifier path. The new tests construct the missing-location states directly and verify the generated LLVM module, making the invariant independent of a particular target matrix.

CI, coverage, and diff audit (2026-09-11)

At head 85854a71c, all existing non-skipped checks pass, including the platform/Wasm tests and benchmark matrix. Codecov patch coverage is 100.00% of the measured diff, not merely an upload-action success. These are results for this exact head; a later rebase still requires new validation.

The 5-file diff is limited to debug-location state, initialization/restoration, and tests. Both review requests are implemented. No debug-info disabling or new test exclusion was added.

Size audit of the benchmark artifacts against each artifact's recorded base: All recorded Wasm module/glue sizes and Linux cprintf/println/fmtprintf size metrics, including LTO variants, are unchanged.

Performance follow-up: TimerRearmStopped measured 2,609 → 3,425 ns/op (+31.3%, five samples) in this run. A controlled repeat is still needed before attributing that timing difference to the debug-location change.

The Wasm benchmark results recorded above cover println only. cpunion/llgo#247 adds cprintf/fmtprintf build and size measurements; those measurements do not establish runtime throughput or independent Go-compatible JavaScript provider acceptance. Native results above must not be read as Wasm measurements. No blanket performance-completion claim is made here.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: synthetic debug location fix

This is a clean, well-scoped fix. All debug-location writes in the ssa package now flow through the new setDebugLocation helper, keeping the tracked diLocation field in sync with the LLVM builder. Synthetic builders created after DebugFunction get a line-zero, function-scoped location — the correct DWARF convention for compiler-generated code — which satisfies LLVM's requirement that inlinable calls carry a !dbg location. Switching deferInitBuilder to read the tracked field instead of GetCurrentDebugLocation() also removes a CGO round-trip.

Verified:

  • All SetCurrentDebugLocation call sites route through setDebugLocation, so diLocation cannot silently desync today.
  • Builder = *aBuilder, so b.diLocation = loc mutates the shared struct as intended.
  • TestSyntheticBuilderDebugLocation covers the three meaningful orderings (before debug init, after debug init, without debug) and asserts the line-zero-in-function-scope invariant plus module verification.

No correctness, security, or performance concerns found. Two minor, non-blocking maintainability notes are inline. (go vet/build could not be run here — the LLVM C headers are unavailable in this environment.)

Comment thread ssa/stmt_builder.go Outdated
Comment thread ssa/eh.go
@codecov

codecov Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cpunion
cpunion force-pushed the codex/fix-synthetic-debug-location-20260908 branch from 9ccd23c to 4d3883b Compare September 8, 2026 01:22
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

85854a71c2ff | workflow run | long-term charts

WebAssembly output sizes

Profile and compiler Wasm module vs base Generated JS glue vs base
ec32/LLGo 112483 B 0 B / +0.0% 70724 B 0 B / +0.0%
ec64/LLGo 118028 B 0 B / +0.0% 74021 B 0 B / +0.0%
js/Go 1895533 B 0 B / +0.0% 0 B 0 B / 0.0%
js/LLGo 66072 B 0 B / +0.0% 68499 B 0 B / +0.0%
wasip1/Go 1909947 B 0 B / +0.0% 0 B 0 B / 0.0%
wasip1/LLGo 72535 B 0 B / +0.0% 0 B 0 B / 0.0%
wc32/LLGo 116428 B 0 B / +0.0% 0 B 0 B / 0.0%

LLGo WebAssembly build measurements

Profile Build vs base
ec32 9.061 s -174.7 ms / -1.9% (better)
ec64 8.622 s +31.29 ms / +0.4% (worse)
js 7.565 s -129.9 ms / -1.7% (better)
wasip1 5.137 s +11.95 ms / +0.2% (worse)
wc32 6.478 s +118.9 ms / +1.9% (worse)

Compared with 3dce98b9191e measured in the same runner job.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

85854a71c2ff | workflow run | long-term charts

Program measurements

Platform Workload File size vs base Text size vs base Build vs base Run vs base
Linux cprintf 19848 B 0 B / +0.0% 387 B 0 B / +0.0% 902.299 ms -17.19 ms / -1.9% (better) 2.182 ms -141.1 us / -6.1% (better)
Linux cprintf-lto 19600 B 0 B / +0.0% 368 B 0 B / +0.0% 904.363 ms -24.25 ms / -2.6% (better) 2.177 ms -86.01 us / -3.8% (better)
Linux fmtprintf 1617304 B 0 B / +0.0% 492562 B 0 B / +0.0% 6.887 s -122.4 ms / -1.7% (better) 6.211 ms +573.7 us / +10.2% (worse)
Linux fmtprintf-lto 1467792 B 0 B / +0.0% 434301 B 0 B / +0.0% 19.040 s -43.01 ms / -0.2% (better) 5.566 ms +74.75 us / +1.4% (worse)
Linux println 62752 B 0 B / +0.0% 15039 B 0 B / +0.0% 871.088 ms -80.57 ms / -8.5% (better) 2.740 ms -192 us / -6.5% (better)
Linux println-lto 54312 B 0 B / +0.0% 12431 B 0 B / +0.0% 1.205 s -89.78 ms / -6.9% (better) 2.564 ms -201.6 us / -7.3% (better)
macOS cprintf 84480 B 0 B / +0.0% 17117 B 0 B / +0.0% 1.365 s +707.2 ms / +107.6% (worse) 12.000 ms +9.011 ms / +301.5% (worse)
macOS cprintf-lto 84288 B 0 B / +0.0% 12881 B 0 B / +0.0% 1.585 s +894.2 ms / +129.4% (worse) 4.341 ms +866 us / +24.9% (worse)
macOS fmtprintf 1473744 B 0 B / +0.0% 867044 B 0 B / +0.0% 3.533 s -129.5 ms / -3.5% (better) 7.838 ms +542.5 us / +7.4% (worse)
macOS fmtprintf-lto 1159552 B 0 B / +0.0% 840436 B 0 B / +0.0% 9.570 s +230.9 ms / +2.5% (worse) 4.246 ms -991.5 us / -18.9% (better)
macOS println 114864 B 0 B / +0.0% 35069 B 0 B / +0.0% 970.391 ms +295.9 ms / +43.9% (worse) 4.906 ms +769.3 us / +18.6% (worse)
macOS println-lto 118736 B 0 B / +0.0% 32729 B 0 B / +0.0% 845.632 ms -11.09 ms / -1.3% (better) 3.393 ms -498.8 us / -12.8% (better)
Windows MinGW cprintf 19456 B 0 B / +0.0% 4550 B 0 B / +0.0% 1.123 s +35.76 ms / +3.3% (worse) 3.316 ms +183 us / +5.8% (worse)
Windows MinGW cprintf-lto 17920 B 0 B / +0.0% 4486 B 0 B / +0.0% 1.131 s +53.89 ms / +5.0% (worse) 3.379 ms +303.7 us / +9.9% (worse)
Windows MinGW fmtprintf 1886720 B 0 B / +0.0% 593350 B 0 B / +0.0% 4.106 s +228.9 ms / +5.9% (worse) 7.802 ms -208.7 us / -2.6% (better)
Windows MinGW fmtprintf-lto 1927680 B 0 B / +0.0% 541606 B 0 B / +0.0% 9.930 s +290.9 ms / +3.0% (worse) 8.583 ms +596.2 us / +7.5% (worse)
Windows MinGW println 71680 B 0 B / +0.0% 23974 B 0 B / +0.0% 1.109 s +23.66 ms / +2.2% (worse) 6.676 ms +375.5 us / +6.0% (worse)
Windows MinGW println-lto 65536 B 0 B / +0.0% 20726 B 0 B / +0.0% 1.314 s -14.99 ms / -1.1% (better) 6.525 ms +516 us / +8.6% (worse)
Windows MinGW 386 cprintf 37888 B 0 B / +0.0% 5326 B 0 B / +0.0% 1.228 s -11.65 ms / -0.9% (better) 5.581 ms -625.4 us / -10.1% (better)
Windows MinGW 386 cprintf-lto 20992 B 0 B / +0.0% 5094 B 0 B / +0.0% 1.215 s -42.31 ms / -3.4% (better) 5.610 ms -11.7 us / -0.2% (better)
Windows MinGW 386 fmtprintf 1843712 B 0 B / +0.0% 467434 B 0 B / +0.0% 4.447 s +128.4 ms / +3.0% (worse) 12.216 ms -1.28 ms / -9.5% (better)
Windows MinGW 386 fmtprintf-lto 2163712 B 0 B / +0.0% 447162 B 0 B / +0.0% 10.750 s +600.5 ms / +5.9% (worse) 12.691 ms -154 us / -1.2% (better)
Windows MinGW 386 println 86528 B 0 B / +0.0% 20374 B 0 B / +0.0% 1.192 s -29.09 ms / -2.4% (better) 9.281 ms -1.237 ms / -11.8% (better)
Windows MinGW 386 println-lto 70656 B 0 B / +0.0% 18262 B 0 B / +0.0% 1.430 s -28.07 ms / -1.9% (better) 10.014 ms -185.7 us / -1.8% (better)
Windows MinGW ARM64 cprintf 18944 B 0 B / +0.0% 4436 B 0 B / +0.0% 1.401 s +770.1 us / +0.1% (worse) 6.108 ms -451.5 us / -6.9% (better)
Windows MinGW ARM64 cprintf-lto 17920 B 0 B / +0.0% 4368 B 0 B / +0.0% 1.426 s -13.11 ms / -0.9% (better) 6.290 ms -198.3 us / -3.1% (better)
Windows MinGW ARM64 fmtprintf 1775104 B 0 B / +0.0% 506200 B 0 B / +0.0% 4.136 s +28.98 ms / +0.7% (worse) 11.923 ms -488.4 us / -3.9% (better)
Windows MinGW ARM64 fmtprintf-lto 1855488 B 0 B / +0.0% 473204 B 0 B / +0.0% 9.565 s -109.5 ms / -1.1% (better) 12.609 ms -172.7 us / -1.4% (better)
Windows MinGW ARM64 println 68608 B 0 B / +0.0% 22880 B 0 B / +0.0% 1.367 s -21.72 ms / -1.6% (better) 10.107 ms -523.1 us / -4.9% (better)
Windows MinGW ARM64 println-lto 65024 B 0 B / +0.0% 20160 B 0 B / +0.0% 1.551 s -46.72 ms / -2.9% (better) 10.341 ms -913.8 us / -8.1% (better)
Windows MSVC cprintf 120320 B 0 B / +0.0% 65782 B 0 B / +0.0% 916.260 ms -1.985 ms / -0.2% (better) 3.331 ms -68.7 us / -2.0% (better)
Windows MSVC cprintf-lto 119808 B 0 B / +0.0% 65718 B 0 B / +0.0% 957.791 ms +17.82 ms / +1.9% (worse) 3.348 ms +8.9 us / +0.3% (worse)
Windows MSVC fmtprintf 1616896 B 0 B / +0.0% 688870 B 0 B / +0.0% 3.656 s -15.93 ms / -0.4% (better) 9.329 ms +427.6 us / +4.8% (worse)
Windows MSVC fmtprintf-lto 1615872 B 0 B / +0.0% 644326 B 0 B / +0.0% 8.847 s +56.79 ms / +0.6% (worse) 9.280 ms -62 us / -0.7% (better)
Windows MSVC println 193024 B 0 B / +0.0% 119382 B 0 B / +0.0% 926.152 ms -179 ms / -16.2% (better) 7.311 ms -2.174 ms / -22.9% (better)
Windows MSVC println-lto 189952 B 0 B / +0.0% 116678 B 0 B / +0.0% 1.104 s +5.728 ms / +0.5% (worse) 7.022 ms -122.6 us / -1.7% (better)
Windows MSVC 386 cprintf 9728 B 0 B / +0.0% 3931 B 0 B / +0.0% 704.269 ms -21.1 ms / -2.9% (better) 4.586 ms -106.6 us / -2.3% (better)
Windows MSVC 386 cprintf-lto 9216 B 0 B / +0.0% 3853 B 0 B / +0.0% 725.046 ms -13.23 ms / -1.8% (better) 4.628 ms -190.3 us / -3.9% (better)
Windows MSVC 386 fmtprintf 1186304 B 0 B / +0.0% 450801 B 0 B / +0.0% 2.976 s +12.98 ms / +0.4% (worse) 38.801 ms -1.257 ms / -3.1% (better)
Windows MSVC 386 fmtprintf-lto 1228288 B 0 B / +0.0% 426629 B 0 B / +0.0% 6.731 s +81.21 ms / +1.2% (worse) 9.604 ms +74.9 us / +0.8% (worse)
Windows MSVC 386 println 34816 B 0 B / +0.0% 19233 B 0 B / +0.0% 694.581 ms -107.4 ms / -13.4% (better) 7.511 ms -1.421 ms / -15.9% (better)
Windows MSVC 386 println-lto 32768 B 0 B / +0.0% 17351 B 0 B / +0.0% 821.563 ms -19.96 ms / -2.4% (better) 7.520 ms -493.1 us / -6.2% (better)
Windows MSVC ARM64 cprintf 11264 B 0 B / +0.0% 3976 B 0 B / +0.0% 2.090 s -18.77 ms / -0.9% (better) 6.882 ms -855 us / -11.1% (better)
Windows MSVC ARM64 cprintf-lto 10752 B 0 B / +0.0% 3868 B 0 B / +0.0% 2.066 s -156.7 ms / -7.1% (better) 7.386 ms +994.9 us / +15.6% (worse)
Windows MSVC ARM64 fmtprintf 1363456 B 0 B / +0.0% 505740 B 0 B / +0.0% 6.495 s +53.5 ms / +0.8% (worse) 14.517 ms -1.034 ms / -6.7% (better)
Windows MSVC ARM64 fmtprintf-lto 1386496 B 0 B / +0.0% 473916 B 0 B / +0.0% 15.470 s -703.4 ms / -4.3% (better) 14.433 ms -85.5 us / -0.6% (better)
Windows MSVC ARM64 println 41984 B 0 B / +0.0% 22216 B 0 B / +0.0% 2.043 s -43.26 ms / -2.1% (better) 12.517 ms +940.7 us / +8.1% (worse)
Windows MSVC ARM64 println-lto 40448 B 0 B / +0.0% 20044 B 0 B / +0.0% 2.373 s -46.25 ms / -1.9% (better) 12.873 ms -58 us / -0.4% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 42.470 ns/op -0.51 ns/op / -1.2% (better)
Linux BenchmarkMergeCompilerFlags 475.100 ns/op +27.6 ns/op / +6.2% (worse)
Linux BenchmarkMergeLinkerFlags 318.800 ns/op +15.6 ns/op / +5.1% (worse)
Linux BenchmarkChannelBuffered 163.900 ns/op +1.2 ns/op / +0.7% (worse)
Linux BenchmarkChannelHandoff 21615 ns/op +680 ns/op / +3.2% (worse)
Linux BenchmarkDefer 155.100 ns/op -0.3 ns/op / -0.2% (better)
Linux BenchmarkDirectCall 4.177 ns/op -0.09 ns/op / -2.1% (better)
Linux BenchmarkGlobalRead 5.132 ns/op -0.028 ns/op / -0.5% (better)
Linux BenchmarkGlobalWrite 6.931 ns/op -0.066 ns/op / -0.9% (better)
Linux BenchmarkGoroutine 34847 ns/op -2073 ns/op / -5.6% (better)
Linux BenchmarkInterfaceCall 31.370 ns/op +0.49 ns/op / +1.6% (worse)
Linux BenchmarkRuntimeGetG 5.900 ns/op -0.103 ns/op / -1.7% (better)
macOS BenchmarkLookupPCRandom 15.990 ns/op +2.17 ns/op / +15.7% (worse)
macOS BenchmarkMergeCompilerFlags 107.600 ns/op -36 ns/op / -25.1% (better)
macOS BenchmarkMergeLinkerFlags 85.200 ns/op -10.19 ns/op / -10.7% (better)
macOS BenchmarkChannelBuffered 26.640 ns/op -7.91 ns/op / -22.9% (better)
macOS BenchmarkChannelHandoff 9412 ns/op +172 ns/op / +1.9% (worse)
macOS BenchmarkDefer 34.460 ns/op -13.44 ns/op / -28.1% (better)
macOS BenchmarkDirectCall 1.083 ns/op -0.155 ns/op / -12.5% (better)
macOS BenchmarkGlobalRead 1.094 ns/op -0.072 ns/op / -6.2% (better)
macOS BenchmarkGlobalWrite 1.104 ns/op -0.167 ns/op / -13.1% (better)
macOS BenchmarkGoroutine 27190 ns/op -25154 ns/op / -48.1% (better)
macOS BenchmarkInterfaceCall 5.045 ns/op -0.752 ns/op / -13.0% (better)
macOS BenchmarkRuntimeGetG 2.205 ns/op -0.031 ns/op / -1.4% (better)
Windows MinGW BenchmarkLookupPCRandom 11.920 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkMergeCompilerFlags 492.700 ns/op -27.4 ns/op / -5.3% (better)
Windows MinGW BenchmarkMergeLinkerFlags 437.700 ns/op +17.2 ns/op / +4.1% (worse)
Windows MinGW BenchmarkChannelBuffered 37.800 ns/op -0.43 ns/op / -1.1% (better)
Windows MinGW BenchmarkChannelHandoff 1293 ns/op -3 ns/op / -0.2% (better)
Windows MinGW BenchmarkDefer 53.640 ns/op +0.06 ns/op / +0.1% (worse)
Windows MinGW BenchmarkDirectCall 1.632 ns/op -0.047 ns/op / -2.8% (better)
Windows MinGW BenchmarkGlobalRead 1.994 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW BenchmarkGlobalWrite 2.710 ns/op +0.051 ns/op / +1.9% (worse)
Windows MinGW BenchmarkGoroutine 65768 ns/op -3611 ns/op / -5.2% (better)
Windows MinGW BenchmarkInterfaceCall 9.190 ns/op +0.209 ns/op / +2.3% (worse)
Windows MinGW BenchmarkRuntimeGetG 2.005 ns/op -0.015 ns/op / -0.7% (better)
Windows MinGW 386 BenchmarkLookupPCRandom 26.630 ns/op +0.09 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkMergeCompilerFlags 820.700 ns/op +87.4 ns/op / +11.9% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 713.700 ns/op +12.4 ns/op / +1.8% (worse)
Windows MinGW 386 BenchmarkChannelBuffered 42.320 ns/op -0.72 ns/op / -1.7% (better)
Windows MinGW 386 BenchmarkChannelHandoff 1033 ns/op -140 ns/op / -11.9% (better)
Windows MinGW 386 BenchmarkDefer 46.730 ns/op +2.53 ns/op / +5.7% (worse)
Windows MinGW 386 BenchmarkDirectCall 1.857 ns/op -0.007 ns/op / -0.4% (better)
Windows MinGW 386 BenchmarkGlobalRead 1.860 ns/op -0.005 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkGlobalWrite 7.776 ns/op +0.002 ns/op / +0.02573% (worse)
Windows MinGW 386 BenchmarkGoroutine 88209 ns/op +204 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkInterfaceCall 9.616 ns/op +0.001 ns/op / +0.0104% (worse)
Windows MinGW 386 BenchmarkRuntimeGetG 2.170 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.050 ns/op +0.02 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 572.200 ns/op -4 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 534.700 ns/op +1.4 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 45.740 ns/op +1.93 ns/op / +4.4% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 2425 ns/op +314 ns/op / +14.9% (worse)
Windows MinGW ARM64 BenchmarkDefer 52.690 ns/op -0.08 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkDirectCall 0.590 ns/op -0.0005 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.663 ns/op -0.002 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.737 ns/op -0.0012 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkGoroutine 58326 ns/op -3958 ns/op / -6.4% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.717 ns/op -0.002 ns/op / -0.04238% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.805 ns/op +0.03 ns/op / +1.7% (worse)
Windows MSVC BenchmarkLookupPCRandom 13.130 ns/op +0.06 ns/op / +0.5% (worse)
Windows MSVC BenchmarkMergeCompilerFlags 623.200 ns/op +3.9 ns/op / +0.6% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 524.500 ns/op -11.7 ns/op / -2.2% (better)
Windows MSVC BenchmarkChannelBuffered 36.610 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC BenchmarkChannelHandoff 1245 ns/op -11 ns/op / -0.9% (better)
Windows MSVC BenchmarkDefer 54.630 ns/op +1.06 ns/op / +2.0% (worse)
Windows MSVC BenchmarkDirectCall 1.547 ns/op -0.001 ns/op / -0.1% (better)
Windows MSVC BenchmarkGlobalRead 1.864 ns/op +0.005 ns/op / +0.3% (worse)
Windows MSVC BenchmarkGlobalWrite 2.474 ns/op +0.003 ns/op / +0.1% (worse)
Windows MSVC BenchmarkGoroutine 78145 ns/op -1224 ns/op / -1.5% (better)
Windows MSVC BenchmarkInterfaceCall 9.319 ns/op +0.019 ns/op / +0.2% (worse)
Windows MSVC BenchmarkRuntimeGetG 2.170 ns/op +0.001 ns/op / +0.0461% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 52.160 ns/op -8.74 ns/op / -14.4% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 533.100 ns/op -15.7 ns/op / -2.9% (better)
Windows MSVC 386 BenchmarkMergeLinkerFlags 532.800 ns/op -7.3 ns/op / -1.4% (better)
Windows MSVC 386 BenchmarkChannelBuffered 44.310 ns/op -0.68 ns/op / -1.5% (better)
Windows MSVC 386 BenchmarkChannelHandoff 3157 ns/op +775 ns/op / +32.5% (worse)
Windows MSVC 386 BenchmarkDefer 32.550 ns/op -0.8 ns/op / -2.4% (better)
Windows MSVC 386 BenchmarkDirectCall 0.353 ns/op +0.0003 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkGlobalRead 0.692 ns/op +0.0035 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkGlobalWrite 12.680 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkGoroutine 74369 ns/op +3072 ns/op / +4.3% (worse)
Windows MSVC 386 BenchmarkInterfaceCall 4.967 ns/op -0.865 ns/op / -14.8% (better)
Windows MSVC 386 BenchmarkRuntimeGetG 0.958 ns/op -0.1219 ns/op / -11.3% (better)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.070 ns/op -0.02 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 585.700 ns/op +12.1 ns/op / +2.1% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 543.800 ns/op +11.5 ns/op / +2.2% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 43.960 ns/op -2.66 ns/op / -5.7% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 2139 ns/op +64 ns/op / +3.1% (worse)
Windows MSVC ARM64 BenchmarkDefer 63.820 ns/op -2.86 ns/op / -4.3% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0006 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.743 ns/op -0.006 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkGoroutine 54887 ns/op -1896 ns/op / -3.3% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.718 ns/op +0.002 ns/op / +0.04241% (worse)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.771 ns/op +0.002 ns/op / +0.1% (worse)

Timer runtime benchmarks

Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 1553 ns/op -25 ns/op / -1.6% (better)
Linux AfterFuncZeroDelivery/LLGo 61716 ns/op +388 ns/op / +0.6% (worse)
Linux CreateStop/Go 393.900 ns/op +6.8 ns/op / +1.8% (worse)
Linux CreateStop/LLGo 2959 ns/op -349 ns/op / -10.6% (better)
Linux RearmStopped/Go 143.200 ns/op +0.6 ns/op / +0.4% (worse)
Linux RearmStopped/LLGo 3425 ns/op +816 ns/op / +31.3% (worse)
Linux ResetActive/Go 98.200 ns/op +0.51 ns/op / +0.5% (worse)
Linux ResetActive/LLGo 1589 ns/op +79 ns/op / +5.2% (worse)
Linux ResetHeap1024/Go 96.990 ns/op +0.52 ns/op / +0.5% (worse)
Linux ResetHeap1024/LLGo 441.300 ns/op +5.3 ns/op / +1.2% (worse)
macOS AfterFuncZeroDelivery/Go 572.800 ns/op +20.7 ns/op / +3.7% (worse)
macOS AfterFuncZeroDelivery/LLGo 88686 ns/op +3517 ns/op / +4.1% (worse)
macOS CreateStop/Go 162.400 ns/op -35.4 ns/op / -17.9% (better)
macOS CreateStop/LLGo 475.300 ns/op -197.1 ns/op / -29.3% (better)
macOS RearmStopped/Go 71.720 ns/op -0.03 ns/op / -0.04181% (better)
macOS RearmStopped/LLGo 360.400 ns/op -31.5 ns/op / -8.0% (better)
macOS ResetActive/Go 43.580 ns/op -12.39 ns/op / -22.1% (better)
macOS ResetActive/LLGo 150.800 ns/op -9.8 ns/op / -6.1% (better)
macOS ResetHeap1024/Go 43.780 ns/op -11.61 ns/op / -21.0% (better)
macOS ResetHeap1024/LLGo 96.070 ns/op -12.73 ns/op / -11.7% (better)
Windows MinGW AfterFuncZeroDelivery/Go 459.300 ns/op -4.3 ns/op / -0.9% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 120695 ns/op +2510 ns/op / +2.1% (worse)
Windows MinGW CreateStop/Go 111.100 ns/op -0.3 ns/op / -0.3% (better)
Windows MinGW CreateStop/LLGo 470.400 ns/op -37.4 ns/op / -7.4% (better)
Windows MinGW RearmStopped/Go 29.990 ns/op -0.42 ns/op / -1.4% (better)
Windows MinGW RearmStopped/LLGo 315.700 ns/op +8.8 ns/op / +2.9% (worse)
Windows MinGW ResetActive/Go 18.100 ns/op -0.17 ns/op / -0.9% (better)
Windows MinGW ResetActive/LLGo 160.500 ns/op +3.9 ns/op / +2.5% (worse)
Windows MinGW ResetHeap1024/Go 18.250 ns/op -0.44 ns/op / -2.4% (better)
Windows MinGW ResetHeap1024/LLGo 145.600 ns/op +0.5 ns/op / +0.3% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 981.800 ns/op +22.7 ns/op / +2.4% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 199084 ns/op +8791 ns/op / +4.6% (worse)
Windows MinGW 386 CreateStop/Go 197.500 ns/op +4.4 ns/op / +2.3% (worse)
Windows MinGW 386 CreateStop/LLGo 2145 ns/op -131 ns/op / -5.8% (better)
Windows MinGW 386 RearmStopped/Go 63.460 ns/op -0.06 ns/op / -0.1% (better)
Windows MinGW 386 RearmStopped/LLGo 374 ns/op +4.2 ns/op / +1.1% (worse)
Windows MinGW 386 ResetActive/Go 39.320 ns/op +0.35 ns/op / +0.9% (worse)
Windows MinGW 386 ResetActive/LLGo 915.400 ns/op +3.9 ns/op / +0.4% (worse)
Windows MinGW 386 ResetHeap1024/Go 39.450 ns/op +0.07 ns/op / +0.2% (worse)
Windows MinGW 386 ResetHeap1024/LLGo 194.400 ns/op -0.1 ns/op / -0.1% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 686.600 ns/op +0.2 ns/op / +0.02914% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 134101 ns/op +10644 ns/op / +8.6% (worse)
Windows MinGW ARM64 CreateStop/Go 199.300 ns/op +0.2 ns/op / +0.1% (worse)
Windows MinGW ARM64 CreateStop/LLGo 374.600 ns/op -3.6 ns/op / -1.0% (better)
Windows MinGW ARM64 RearmStopped/Go 70.330 ns/op -0.24 ns/op / -0.3% (better)
Windows MinGW ARM64 RearmStopped/LLGo 279.300 ns/op -2 ns/op / -0.7% (better)
Windows MinGW ARM64 ResetActive/Go 31.040 ns/op +0.18 ns/op / +0.6% (worse)
Windows MinGW ARM64 ResetActive/LLGo 120.800 ns/op -9.5 ns/op / -7.3% (better)
Windows MinGW ARM64 ResetHeap1024/Go 30.970 ns/op -0.14 ns/op / -0.5% (better)
Windows MinGW ARM64 ResetHeap1024/LLGo 138.500 ns/op -0.7 ns/op / -0.5% (better)
Windows MSVC AfterFuncZeroDelivery/Go 571.900 ns/op +4.5 ns/op / +0.8% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 150126 ns/op -10910 ns/op / -6.8% (better)
Windows MSVC CreateStop/Go 116 ns/op -1.8 ns/op / -1.5% (better)
Windows MSVC CreateStop/LLGo 478.700 ns/op -7.7 ns/op / -1.6% (better)
Windows MSVC RearmStopped/Go 31.500 ns/op -0.18 ns/op / -0.6% (better)
Windows MSVC RearmStopped/LLGo 311.500 ns/op +7.9 ns/op / +2.6% (worse)
Windows MSVC ResetActive/Go 20.100 ns/op -0.01 ns/op / -0.04973% (better)
Windows MSVC ResetActive/LLGo 150.300 ns/op +0.9 ns/op / +0.6% (worse)
Windows MSVC ResetHeap1024/Go 20.550 ns/op +0.06 ns/op / +0.3% (worse)
Windows MSVC ResetHeap1024/LLGo 141.700 ns/op +1.1 ns/op / +0.8% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 768.800 ns/op +76.2 ns/op / +11.0% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 317727 ns/op +3245 ns/op / +1.0% (worse)
Windows MSVC 386 CreateStop/Go 177.800 ns/op -0.8 ns/op / -0.4% (better)
Windows MSVC 386 CreateStop/LLGo 60420 ns/op +838 ns/op / +1.4% (worse)
Windows MSVC 386 RearmStopped/Go 67.050 ns/op +1.87 ns/op / +2.9% (worse)
Windows MSVC 386 RearmStopped/LLGo 275.800 ns/op +14.3 ns/op / +5.5% (worse)
Windows MSVC 386 ResetActive/Go 31.110 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC 386 ResetActive/LLGo 247.700 ns/op +22.1 ns/op / +9.8% (worse)
Windows MSVC 386 ResetHeap1024/Go 31.420 ns/op -0.14 ns/op / -0.4% (better)
Windows MSVC 386 ResetHeap1024/LLGo 125.100 ns/op -15.4 ns/op / -11.0% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 668.200 ns/op +1.5 ns/op / +0.2% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 123885 ns/op -11993 ns/op / -8.8% (better)
Windows MSVC ARM64 CreateStop/Go 199.800 ns/op -0.9 ns/op / -0.4% (better)
Windows MSVC ARM64 CreateStop/LLGo 471.100 ns/op -12.8 ns/op / -2.6% (better)
Windows MSVC ARM64 RearmStopped/Go 70.610 ns/op +0.26 ns/op / +0.4% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 306.800 ns/op -10.4 ns/op / -3.3% (better)
Windows MSVC ARM64 ResetActive/Go 31.040 ns/op -0.08 ns/op / -0.3% (better)
Windows MSVC ARM64 ResetActive/LLGo 156.900 ns/op +2.7 ns/op / +1.8% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 31.070 ns/op +0.08 ns/op / +0.3% (worse)
Windows MSVC ARM64 ResetHeap1024/LLGo 144.300 ns/op -0.5 ns/op / -0.3% (better)

Compared with 3dce98b9191e measured in the same runner job.

@cpunion cpunion changed the title fix(ssa): preserve debug locations in synthetic builders [Superseded by #2530] fix(ssa): preserve synthetic debug locations Sep 11, 2026
@cpunion cpunion closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant