Skip to content

Commit

Permalink
Fix gc loaded usage
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Sep 2, 2024
1 parent 4ddaccd commit 4aa1d5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3777,6 +3777,13 @@ function annotate!(mod, mode)
end
end

for fname in ("julia.gc_loaded",)
if haskey(fns, fname)
fn = fns[fname]
push!(function_attributes(fn), LLVM.StringAttribute("enzyme_shouldrecompute"))
end
end

for fname in ("julia.get_pgcstack", "julia.ptls_states", "jl_get_ptls_states", "julia.safepoint", "ijl_throw", "julia.pointer_from_objref",
"ijl_array_grow_end", "jl_array_grow_end", "ijl_array_del_end", "jl_array_del_end",
"ijl_array_grow_beg", "jl_array_grow_beg", "ijl_array_del_beg", "jl_array_del_beg",
Expand Down
6 changes: 0 additions & 6 deletions src/rules/llvmrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1368,12 +1368,6 @@ end
@revfunc(jlcall2_rev),
@fwdfunc(jlcall2_fwd),
)
register_handler!(
("julia.gc_loaded",),
@augfunc(gcloaded_augfwd),
@revfunc(gcloaded_rev),
@fwdfunc(gcloaded_fwd),
)
register_handler!(
("jl_apply_generic", "ijl_apply_generic"),
@augfunc(generic_augfwd),
Expand Down

0 comments on commit 4aa1d5b

Please sign in to comment.