We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67adf26 commit 59fd5deCopy full SHA for 59fd5de
src/optim.jl
@@ -257,11 +257,14 @@ function lower_gc_frame!(fun::LLVM.Function)
257
sz = ops[2]
258
259
# replace with PTX alloc_obj
260
- let builder = Builder(ctx)
+ Builder(ctx) do builder
261
+ # NOTE: this happens late during the pipeline, where we may have to
262
+ # pass a kernel state arguments to the runtime function.
263
+ state = kernel_state_type(job)
264
+
265
position!(builder, call)
- ptr = call!(builder, Runtime.get(:gc_pool_alloc), [sz])
266
+ ptr = call!(builder, Runtime.get(:gc_pool_alloc), [sz]; state)
267
replace_uses!(call, ptr)
- dispose(builder)
268
end
269
270
unsafe_delete!(LLVM.parent(call), call)
0 commit comments