

def llvm_to_ptx(llvmir, **opts):
    cu = CompilationUnit()
    libdevice = LibDevice(arch=opts.get('arch', 'compute_20'))
    llvmir = _replace_datalayout(llvmir)
    replacements = [('declare i32 @___numba_cas_hack(i32*, i32, i32)', ir_numba_cas_hack), ('declare double @___numba_atomic_double_add(double*, double)', ir_numba_atomic_double_add), ('declare double @___numba_atomic_double_max(double*, double)', ir_numba_atomic_double_max)]
    for (decl, fn) in replacements:
        llvmir = llvmir.replace(decl, fn)
    llvmir = llvm37_to_34_ir(llvmir)
    cu.add_module(llvmir.encode('utf8'))
    cu.add_module(cu.get())
    ptx = cu.compile(**opts)
    return ptx

dataset/ETHPy150Open numba/numba/numba/cuda/cudadrv/nvvm.py llvm_to_ptx/VarMisuse@110/236 `libdevice`->`cu`