Skip to content

Commit

Permalink
Improve zero-set location error (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Sep 4, 2024
1 parent d7cb43b commit 75a2f4c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/rules/llvmrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,12 @@ end
elSize = LLVM.zext!(B, elSize, LLVM.IntType(8*sizeof(Csize_t)))
len = get_array_len(B, shadowin)
length = LLVM.mul!(B, len, elSize)
GPUCompiler.@safe_warn "TODO forward zero-set of arraycopy used memset rather than runtime type"
bt = GPUCompiler.backtrace(orig)
btstr = sprint() do io
print(io,"\nCaused by:")
Base.show_backtrace(io, bt)
end
GPUCompiler.@safe_warn "TODO forward zero-set of arraycopy used memset rather than runtime type $btstr"
LLVM.memset!(B, get_array_data(B, shadowres), LLVM.ConstantInt(i8, 0, false), length, algn)
end
if API.runtimeActivity()
Expand All @@ -345,7 +350,12 @@ end
elSize = LLVM.zext!(B, elSize, LLVM.IntType(8*sizeof(Csize_t)))
len = get_array_len(B, ev)
length = LLVM.mul!(B, len, elSize)
GPUCompiler.@safe_warn "TODO forward zero-set of arraycopy used memset rather than runtime type"
bt = GPUCompiler.backtrace(orig)
btstr = sprint() do io
print(io,"\nCaused by:")
Base.show_backtrace(io, bt)
end
GPUCompiler.@safe_warn "TODO forward zero-set of arraycopy used memset rather than runtime type $btstr"
LLVM.memset!(B, get_array_data(B, callv), LLVM.ConstantInt(i8, 0, false), length, algn)
end
if API.runtimeActivity()
Expand Down

0 comments on commit 75a2f4c

Please sign in to comment.