Skip to content

Commit

Permalink
Delete range md when deleting return in julia (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Oct 6, 2023
1 parent 7820c99 commit 6addb6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/compiler/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,10 @@ function propagate_returned!(mod::LLVM.Module)
push!(todo, un)
end
for un in todo
md = metadata(un)
if !keepret && haskey(md, LLVM.MD_range)
delete!(md, LLVM.MD_range)
end
API.EnzymeSetCalledFunction(un, nfn, toremove)
end
unsafe_delete!(mod, fn)
Expand Down

0 comments on commit 6addb6e

Please sign in to comment.