[Based on #2159] debug: keep optimization and SSA rewrites DWARF-safe#2143
Open
cpunion wants to merge 7 commits into
Open
[Based on #2159] debug: keep optimization and SSA rewrites DWARF-safe#2143cpunion wants to merge 7 commits into
cpunion wants to merge 7 commits into
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Jul 21, 2026
cpunion
force-pushed
the
codex/dwarf-opt-pipeline
branch
from
July 22, 2026 08:19
8817c9d to
6e8d80a
Compare
cpunion
marked this pull request as ready for review
July 22, 2026 09:19
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This was referenced Jul 22, 2026
cpunion
force-pushed
the
codex/dwarf-opt-pipeline
branch
from
July 23, 2026 00:20
31a3bbf to
d4f4386
Compare
cpunion
force-pushed
the
codex/dwarf-opt-pipeline
branch
from
July 23, 2026 01:09
d4f4386 to
1955174
Compare
cpunion
force-pushed
the
codex/dwarf-opt-pipeline
branch
from
July 23, 2026 05:07
1955174 to
7c57a58
Compare
This was referenced Jul 23, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #2159.
Problem
DWARF must not change executable semantics. Enabling the normal optimization pipeline for debug builds exposed four independent places where debug metadata affected code generation:
!dbg, so full LTO verification abortedssa.DebugRefusers blocked LLGo's return-load and single-case-select order repairsssa.DebugRefusers blocked otherwise valid static global slice foldingRunning full LTO with DWARF also exposes aggregate Go string values to the reflect
MethodByNameplugin. The prerequisite #2159 handles that plugin boundary independently and preserves both aggregate and legacy split-string analysis. This PR contains no LTO plugin implementation changes.Changes
ModeGenas raw generated IRssa.DebugRefusers together with repaired return loads and select assignment dependencies, while still rejecting executable early usesDebugRefpseudo-users when proving a static slice initializerThis consolidates the changes previously proposed in #2144 and #2146. It does not change the default
-wpolicy, Python-specific debugging, pclntab policy, C ABI variable homes, LLDB language behavior, or non-debug optimization policy.Fixes #2118.
Fixes #2121.
Fixes #2122.
Verification
ssaandinternal/buildpackage testscl,ssa,internal/build, andtest/gocoverage run (61.5% aggregate package coverage)Ubuntu validation was limited to 2 CPUs, 15 GiB memory, and 512 PIDs.