-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix #52531, fix the effects modeling of QuoteNode
#52548
Conversation
I think in the current design this is the right solution. Coming from LLVM our modelling of So It took me a while to understand that in Julia these are like the other effects modeled with respect to the containing/parent function. E.g. To infer the function global effects we would then need to ask the question "where did the memory come from". |
Although I'm not completely certain about the exact interpretation of
Hmm really? As far as I understand LLVM's |
I think so. My point is that in LLVM the memory attribute is with reference to the called function (not within the context of the calling function).
No. LLVM doesn't make the distinction between mutable/immutable memory that we do. So there is no refinement for immutable memory (which also wouldn't be
So it says this function does read memory, but none that is reachable from the caller (also see https://groups.google.com/g/llvm-dev/c/1ptivB6H6_c/m/oxLBU4tqAAAJ) |
Right, memory attributes with respect to arguments don't translate to the parent (they do for accessing globals of course). |
@aviatesk, can you push a backported commit of this to the backport 1.10 branch? |
Done. |
Backported PRs: - [x] #51234 <!-- Fix getfield codegen for tuple inputs and unknown symbol fields. --> - [x] #52170 <!-- fix invalidations related to `ismutable` --> - [x] #52342 <!-- Add single-term multiplication for `AbstractQ` on v1.10 and above --> - [x] #52333 <!-- bugfix for dot of Hermitian{noncommutative} --> - [x] #52407 <!-- channels: fix memory ordering violation in iterate --> - [x] #52405 <!-- Bump LLVM to 15.0.7+10 to fix GC issue --> - [x] #52441 <!-- Remove `Pkg` dependency from `SuiteSparse_jll` --> - [x] #52367 <!-- docs: add notes about scratchspaces in depot --> - [x] #52456 <!-- Make `jl_write_coverage_data` dllexported again --> - [x] #52294 <!-- GC scheduler refinements --> - [x] #52359 <!-- make custom log macros work --> - [x] #52548
What observed in #52531 is that
QuoteNode
can embed global variables that users can modify. Therefore, when dealing withQuoteNode
, it's necessary to taint its:inaccessiblememonly
just like we do forGlobalRef
.