Conversation
This was referenced Sep 25, 2026
maleadt
added this pull request to stack #951
September 25, 2026 06:14
maleadt
force-pushed
the
tb/remove-atomics-demotion
branch
from
September 25, 2026 06:55
19815d4 to
78d617d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## tb/reject-reference-allocations #950 +/- ##
===================================================================
- Coverage 86.39% 86.38% -0.01%
===================================================================
Files 29 29
Lines 5805 5794 -11
===================================================================
- Hits 5015 5005 -10
+ Misses 790 789 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
`demote_atomics!` turned every LLVM atomic load and store into a plain one on Metal and SPIR-V to accommodate Julia's GC orderings. Dead exception objects are now removed, and remaining allocations of objects that contain references are rejected, so those orderings no longer reach the back-ends. The demotion therefore only weakened user atomics (UnsafeAtomics' `load`/`store!` and Atomix' `get`/`set!`).
maleadt
force-pushed
the
tb/remove-atomics-demotion
branch
from
September 28, 2026 16:52
78d617d to
971e6ae
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.
demote_atomics!(#904, #924, #927) turned every LLVM atomic load and store into a plain one on Metal and SPIR-V because Julia's GC orderings (unorderedreference loads and stores,releasetype-tag stores) reached back-ends that cannot express them. This also silently weakened user atomics, such as UnsafeAtomics'load/store!and Atomix'get/set!on OpenCL, oneAPI, and POCL: the vendor compiler could hoist a spin-wait's atomic load.#940 removes dead exception objects, and #949 rejects remaining allocations of objects that contain references. The GC orderings that required this workaround therefore no longer reach the back-ends, so this PR removes the demotion.
With the whole stack, test results are unchanged (see #949). The KernelAbstractions POCL test suite has 11 UnsafeAtomics/Atomix atomics that are no longer demoted.
Reflection (
code_llvm,code_native) does not validate IR, so an object with references can still reach the back-end with its GC orderings, as can other invalid IR.