Skip to content

Commit 3fe4229

Browse files
committed
Emit correct kernel arguments debug metadata types when NUMBA_DUMP_LLVM is on.
After shifting out the return value type from the operands of 'types' field of the 'DISubroutineType' metadata node, compiler needs to clear the cached string representation of the corresponding MDValue object if NUMBA_DUMP_LLVM is on. Because at that moment, the cached string has already been filled with the tuple before kernel_fixup() which has the return value type and continue being used when printing out the LLVM IR. This change fixes #135
1 parent 3e9e705 commit 3fe4229

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

numba_cuda/numba/cuda/compiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ def kernel_fixup(kernel, debug):
427427
if tm_name == 'types':
428428
types = tm_value
429429
types.operands = types.operands[1:]
430+
if config.DUMP_LLVM:
431+
types._clear_string_cache()
430432

431433
# Mark as a kernel for NVVM
432434

0 commit comments

Comments
 (0)