Skip to content

Commit

Permalink
replace uses
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Dec 5, 2024
1 parent 48ac1f7 commit d26099a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/llvm/transforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,12 @@ end

function delete_writes_into_removed_args(fn::LLVM.Function, toremove::Vector{Int64}, keepret::Bool)
args = collect(parameters(fn))
if !keepret
for u in LLVM.uses(fn)
u = LLVM.user(u)
replace_uses!(u, LLVM.UndefValue(value_type(u)))
end
end
for tr in toremove
tr = tr + 1
todorep = Tuple{LLVM.Instruction, LLVM.Value}[]
Expand Down

0 comments on commit d26099a

Please sign in to comment.