Skip to content

Commit

Permalink
Ensure we attach debuginfo to the rng initializer call.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Aug 17, 2023
1 parent cd8034c commit bf5c57a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/compiler/compilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ function GPUCompiler.finish_module!(@nospecialize(job::CUDACompilerJob),
bb = BasicBlock(top_bb, "initialize_rng")
LLVM.@dispose builder=IRBuilder() begin
position!(builder, bb)
subprogram = LLVM.get_subprogram(entry)
if subprogram !== nothing
loc = DILocation(0, 0, subprogram)
debuglocation!(builder, loc)
end
debuglocation!(builder, first(instructions(top_bb)))

# call the `deferred_codegen` marker function
T_ptr = LLVM.Int64Type()
Expand Down

0 comments on commit bf5c57a

Please sign in to comment.