Skip to content

Commit

Permalink
Update validation.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Dec 6, 2024
1 parent 39ac9eb commit d629c30
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,21 @@ import GPUCompiler: IRError, InvalidIRError

function restore_lookups(mod::LLVM.Module)::Nothing
T_size_t = convert(LLVM.LLVMType, Int)
for (v, k) in FFI.ptr_map
if haskey(functions(mod), k)
f = functions(mod)[k]
replace_uses!(
f,
LLVM.Value(
LLVM.API.LLVMConstIntToPtr(
ConstantInt(T_size_t, convert(UInt, v)),
value_type(f),
),
),
)
eraseInst(mod, f)
end
end
for f in functions(mod)
for fattr in collect(function_attributes(f))
if isa(fattr, LLVM.StringAttribute)
Expand Down

0 comments on commit d629c30

Please sign in to comment.