-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canonicalize IR to disallow mutable GlobalRef in value position #39893
Conversation
I think this is the right direction, but I'm not sure I agree with the memory model arguments here. LLVM will certainly freely duplicate these loads unless they're annotated volatile. Does our memory model make any guarantees in the presence of a data race here? |
Yes, weakly. These are relaxed atomics currently, though I'd like to consider strengthening it to release/consume for non-mutated fields–such as typeof–in a future release (unrelated to this PR). |
All right, fair enough. |
…aLang#39893) Generally we assume parameters can be duplicated without seeing side-effects. That is not entirely true of mutable globals and multi-threading. Refs: JuliaLang#36450 Fixes: JuliaLang#39508
…aLang#39893) Generally we assume parameters can be duplicated without seeing side-effects. That is not entirely true of mutable globals and multi-threading. Refs: JuliaLang#36450 Fixes: JuliaLang#39508
Generally we assume parameters can be duplicated without seeing
side-effects. That is not entirely true of mutable globals and
multi-threading.
Refs: #36450
Fixes: #39508