Skip to content

Commit

Permalink
Update validation.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Dec 4, 2024
1 parent a7af7ad commit 1831a97
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 1831a97

Please sign in to comment.