numba_dpex.utils.llvm_codegen_helpers module
- class numba_dpex.utils.llvm_codegen_helpers.LLVMTypes
Bases:
object
A helper class to get LLVM Values for integer C types.
- byte_ptr_ptr_t = <<class 'llvmlite.ir.types.PointerType'> i8**>
- byte_ptr_t = <<class 'llvmlite.ir.types.PointerType'> i8*>
- byte_t = <<class 'llvmlite.ir.types.IntType'> i8>
- int32_ptr_t = <<class 'llvmlite.ir.types.PointerType'> i32*>
- int32_t = <<class 'llvmlite.ir.types.IntType'> i32>
- int64_ptr_t = <<class 'llvmlite.ir.types.PointerType'> i64*>
- int64_t = <<class 'llvmlite.ir.types.IntType'> i64>
- void_t = <<class 'llvmlite.ir.types.VoidType'> void>
- numba_dpex.utils.llvm_codegen_helpers.create_null_ptr(builder, context)
Allocates a new LLVM Value storing a
void*
and returns the Value to caller.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
Returns: An LLVM value storing a null pointer
- numba_dpex.utils.llvm_codegen_helpers.get_llvm_ptr_type(type)
Returns an LLVM pointer type for a give LLVM type object.
- Args:
type: An LLVM type for which we need the corresponding pointer type.
Returns: An LLVM pointer type object corresponding to the input LLVM type.
- numba_dpex.utils.llvm_codegen_helpers.get_llvm_type(context, type)
Returns the LLVM Value corresponsing to a Numba type.
- Args:
- context: The LLVM context or the execution state of the current IR
generator.
type: A Numba type object.
- Returns: An Python object wrapping an LLVM Value corresponding to the
specified Numba type.
- numba_dpex.utils.llvm_codegen_helpers.get_one(context)
Returns an LLVM Constant storing a 64 bit representation for one.
- Args:
context: The LLVM IR builder context.
Returns: An LLVM Contant Value storing one.
- numba_dpex.utils.llvm_codegen_helpers.get_zero(context)
Returns an LLVM Constant storing a 64 bit representation for zero.
- Args:
context: The LLVM IR builder context.
Returns: An LLVM Contant Value storing zero.