Repository navigation
LateLowerGCFrame: honor the "julia.safepoint" call-site marker - #63462
Merged
Merged
Conversation
vchuravy
added this pull request to stack #63466
September 28, 2026 17:00
This was referenced Sep 28, 2026
vchuravy
marked this pull request as ready for review
October 3, 2026 02:20
Member
Author
|
This would also be useful for Enzyme, since it annotates calls more aggressively than Julia base. |
Calls tagged "julia.safepoint" are Julia calls whose memory effects codegen narrowed from inferred effects. They can still reach a GC safepoint, so LocalScan must treat them as safepoints regardless of what the memory effects claim, and the effects must be stripped before any post-lowering pass could use them against the now-explicit GC frame stores. This is the rooting half of re-landing #61394 (reverted in #62697, see #62613): rooting no longer depends on pass ordering having stripped the attributes first. Assisted-by: Claude Code (Fable 5.1)
vchuravy
force-pushed
the
vc/effects-1-safepoint-marker
branch
from
October 3, 2026 02:21
625f768 to
60e081d
Compare
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.
First of a 4-PR stack re-landing #61394 (reverted in #62697 because of #62613): #63462 → #63463 → #63464 → #63465.
Calls tagged with the string attribute
"julia.safepoint"are Julia calls whose memory effects codegen narrowed from inferred effects (that emission lands in #63464). They can still reach a GC safepoint, so:LocalScantreats tagged calls as safepoints regardless of what their memory effects claim, so rooting never depends on pass ordering having stripped the attributes first (the failure mode identified inadd_fn_attrs_for_effectsmarks calls that can write memory asmemory(read: argmem)#62613).runOnFunctionstrips the memory effects (and anyreadnoneon the gcstack argument) from tagged calls before any post-lowering pass could use them against the now-explicit GC frame stores.On master nothing emits the marker yet, so this is a pure hardening change with no behavioral effect; it exists so the safety net is in place before #63464 relies on it. Subsumes the
LocalScangate from #62698.Tests: five new cases in
test/llvmpasses/late-lower-gc.ll(argmem-only, readonly, indirect call, gcstackreadnonestripping, and a negative control for a genuinely readonly helper).🤖 Generated with Claude Code