-
Notifications
You must be signed in to change notification settings - Fork 55
Fixes for 1.13 #693
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
Merged
Fixes for 1.13 #693
Conversation
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #693 +/- ##
==========================================
- Coverage 73.70% 72.07% -1.64%
==========================================
Files 24 24
Lines 3472 3484 +12
==========================================
- Hits 2559 2511 -48
- Misses 913 973 +60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/jlgen.jl b/src/jlgen.jl
index f98780f..5754896 100644
--- a/src/jlgen.jl
+++ b/src/jlgen.jl
@@ -702,14 +702,20 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
# Since Julia 1.13, the caller is responsible for initializing global variables that
# point to global values or bindings with their address in memory.
num_gvars = Ref{Csize_t}(0)
- @ccall jl_get_llvm_gvs(native_code::Ptr{Cvoid}, num_gvars::Ptr{Csize_t},
- C_NULL::Ptr{Cvoid})::Nothing
+ @ccall jl_get_llvm_gvs(
+ native_code::Ptr{Cvoid}, num_gvars::Ptr{Csize_t},
+ C_NULL::Ptr{Cvoid}
+ )::Nothing
gvs = Vector{Ptr{LLVM.API.LLVMOpaqueValue}}(undef, num_gvars[])
- @ccall jl_get_llvm_gvs(native_code::Ptr{Cvoid}, num_gvars::Ptr{Csize_t},
- gvs::Ptr{LLVM.API.LLVMOpaqueValue})::Nothing
+ @ccall jl_get_llvm_gvs(
+ native_code::Ptr{Cvoid}, num_gvars::Ptr{Csize_t},
+ gvs::Ptr{LLVM.API.LLVMOpaqueValue}
+ )::Nothing
inits = Vector{Ptr{Cvoid}}(undef, num_gvars[])
- @ccall jl_get_llvm_gv_inits(native_code::Ptr{Cvoid}, num_gvars::Ptr{Csize_t},
- inits::Ptr{Cvoid})::Nothing
+ @ccall jl_get_llvm_gv_inits(
+ native_code::Ptr{Cvoid}, num_gvars::Ptr{Csize_t},
+ inits::Ptr{Cvoid}
+ )::Nothing
for (gv_ref, init) in zip(gvs, inits)
gv = GlobalVariable(gv_ref)
diff --git a/test/native.jl b/test/native.jl
index 1821761..794a0e3 100644
--- a/test/native.jl
+++ b/test/native.jl
@@ -273,9 +273,9 @@ end
@test !occursin("%safepoint", ir)
ir = sprint(io->Native.code_llvm(io, identity, Tuple{Nothing}; entry_safepoint=true, optimize=false, dump_module=true))
- @test occursin("%safepoint", ir) broken=(VERSION >= v"1.13.0-DEV.533")
- # XXX: broken by JuliaLang/julia#57010,
- # see https://github.com/JuliaLang/julia/pull/57010/files#r2079576894
+ @test occursin("%safepoint", ir) broken = (VERSION >= v"1.13.0-DEV.533")
+ # XXX: broken by JuliaLang/julia#57010,
+ # see https://github.com/JuliaLang/julia/pull/57010/files#r2079576894
end
@testset "always_inline" begin |
Switches to putting globals in AS 1, as LLVM now defaults to starting with version 19.
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.
Fallout from replace incorrect Method.deleted_world with more useful Method.dispatch_status enum JuliaLang/julia#58291
Fallout from trimming: Support finalizers JuliaLang/julia#58014
Fallout from codegen: add a pass for late conversion of known modify ops to call atomicrmw JuliaLang/julia#57010
Marked the test as
broken
for now; the change injl_emit_native
seems really ad-hoc.Debug info version mismatch
Data layout mismatch
Changes in bindings: global variables now don't get initializer anymore, so we can't reconstruct the object pointer. This was broken by codegen: add a pass for late conversion of known modify ops to call atomicrmw JuliaLang/julia#57010, see codegen: add a pass for late conversion of known modify ops to call atomicrmw JuliaLang/julia#57010 (review)
Looks like the way bindings are resolved has completely changed. Take this simple example:
This used to emit something like:
... which GPUCompiler.jl could pry a pointer to the binding from. Now we get:
I guess we're missing some things getting linked here.
Changes in dynamic invocations