numba.ast_translate

class numba.ast_translate.ComplexSupportMixin

Support for complex numbers

class numba.ast_translate.LLVMCodeGenerator(context, func, ast, func_signature, symtab, optimize=True, nopython=False, llvm_module=None, refcount_args=True, **kwds)

Translate a Python AST to LLVM. Each visit_* method should directly return an LLVM value.

build_wrapper_function(get_lfunc=False)

Build a wrapper function for the currently translated function.

By default, or if get_lfunc is false, return the interpreter-level wrapper function.

If the optional get_lfunc argument is true, return the interpreter-level wrapper function, the LLVM wrapper function, and the method definition record.

build_wrapper_module()

Build a wrapper function for the currently translated function, and return a tuple containing the separate LLVM module, and the LLVM wrapper function.

c_array_to_pointer(name, stackspace, var)

Decay a C array to a pointer to allow pointer access

generate_assign_stack(lvalue, ltarget, tbaa_node=None, tbaa_type=None, decref=False, incref=False)

Generate assignment operation and automatically cast value to match the target type.

handle_phis()

Update all our phi nodes after translation is done and all Variables have their llvm values set.

insert_closure_scope_arg(args, node)

Retrieve the closure from the NumbaFunction passed in as m_self

is_block_terminated(basic_block=None)

Check if the current basicblock is properly terminated. That means the basicblock is ended with a branch or return

Link the lfunc into the execution context

load_tbaa(ptr, tbaa_type, name='')

Load a pointer and annotate with Type Based Alias Analysis metadata.

preload_attributes(var, value)

Pre-load ndarray attributes data/shape/strides.

store_tbaa(value, ptr, tbaa_type)

Load a pointer and annotate with Type Based Alias Analysis metadata.

visit_ControlBlock(node)

Return a new basic block and handle phis and promotions. Promotions are needed at merge (phi) points to have a consistent type.

class numba.ast_translate.LLVMContextManager

TODO: Make this class not a singleton. A possible design is to let each Numba Context owns a LLVMContextManager.

numba.ast_translate.llvm_alloca(lfunc, builder, ltype, name='', change_bb=True)

Use alloca only at the entry bock of the function

Previous topic

numba.ast_constant_folding

Next topic

numba.ast_type_inference

This Page