-
-
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
Illegal Julia AllocOpt Lowering #47075
Comments
#45013 is the general issue, but of course there may be a short term band-aid. |
I mean one bandaid could be just adding a has_ref and has_refagg even if a field isn't stored, to default init it in the case of unknown offsets? |
This was referenced Oct 6, 2022
vtjnash
pushed a commit
that referenced
this issue
Oct 10, 2022
Fixes issued mentioned in #47075 (comment)
KristofferC
pushed a commit
that referenced
this issue
Oct 27, 2022
Fixes issued mentioned in #47075 (comment) (cherry picked from commit a68235c)
KristofferC
pushed a commit
that referenced
this issue
Oct 28, 2022
Fixes issued mentioned in #47075 (comment) (cherry picked from commit a68235c)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AllocOpt incorrectly lowers a julia object created by a gc.alloc which itself contains several sub objects into a stack allocation of
[i8 x 8000]
, instead of either nothing, or a stack allocation of julia objects.This appears to be the case because the use of the object for storing/loading julia objects occurs through a gep of unknown offset (say
%i49 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %_malloccache.i, i64 %"iv'ac.i.0"
). As a result, addMemOp will never run for the load or store (https://github.com/wsmoses/julia/blob/6a1ba090901cd15378acec12c4f172fb7d4c9e6b/src/llvm-alloc-helpers.cpp#L235). That will prevent the allocation from being marked as having an objref (https://github.com/wsmoses/julia/blob/6a1ba090901cd15378acec12c4f172fb7d4c9e6b/src/llvm-alloc-helpers.cpp#L93) and as a result when iterating through all memops (julia/src/llvm-alloc-opt.cpp
Line 234 in 92e68c8
cc @vchuravy
Tested on 1.8.1 (and seemingly remains from the code linked above)
The text was updated successfully, but these errors were encountered: