Use alloca only at the entry bock of the function
Bases: object
Object that knows how to convert to/from objects using Py_BuildValue and PyArg_ParseTuple.
Build a dict from a bunch of LLVM values
Build a tuple from a bunch of LLVM values
Build a tuple from a bunch of LLVM values
Check for errors. If the result is NULL, and error should have been set Jumps to translator.error_label if an exception occurred.
Generate code to convert an LLVM value to a Python object
Get an llvm format string for the given types
Unpack a Python tuple into typed llvm variables
Generate code to convert a Python object to an LLVM value
Bases: object
Support for complex numbers
Bases: object
TODO: Make this class not a singleton. A possible design is to let each Numba Context owns a LLVMContextManager.
Link a source module into a destination module while preserving the execution engine’s global mapping of pointers.
Module that creates wrapper around llvm functions. The wrapper is callable from Python.
Build a wrapper function for the currently translated function.
Return the interpreter-level wrapper function, the LLVM wrapper function, and the method definition record.
Build AST for LLVM function wrapper.
lfunc: LLVM function to wrap llvm_module: module the wrapper is being defined in
The resulting AST has a NativeCallNode to the wrapped function. The arguments are LLVMValueRefNode nodes which still need their llvm_value set to the object from the tuple. This happens in visit_FunctionWrapperNode during codegen.
Build a wrapper function for the currently translated function, and return a tuple containing the separate LLVM module, and the LLVM wrapper function.
Generate a wrapper function in the given llvm module.
Retrieve the closure from the NumbaFunction from the func_closure attribute.
- func_signature:
- signature of closure function
- func_obj:
- LLVM Value referencing the closure function as a Python object
Create a NumbaFunction (numbafunction.c)
Bases: object
Py_DECREF a value
Py_INCREF a value
Refcount a value with a refcounting function
Py_XDECREF a value
Py_XDECREF a temporary
Cleanup a temp at the end of the function:
Py_XINCREF a value
Py_XINCREF a temporary
Bases: numba.visitors.NumbaVisitor, numba.codegen.complexsupport.ComplexSupportMixin, numba.codegen.refcounting.RefcountingMixin, numba.visitors.NoPythonContextMixin
Translate a Python AST to LLVM. Each visit_* method should directly return an LLVM value.
Decay a C array to a pointer to allow pointer access
Generate assignment operation and automatically cast value to match the target type.
Update all our phi nodes after translation is done and all Variables have their llvm values set.
Check if the current basicblock is properly terminated. That means the basicblock is ended with a branch or return
Load a pointer and annotate with Type Based Alias Analysis metadata.
Pre-load ndarray attributes data/shape/strides.
Load a pointer and annotate with Type Based Alias Analysis metadata.
Return a new basic block and handle phis and promotions. Promotions are needed at merge (phi) points to have a consistent type.
Slice an array. Allocate fake PyArray and allocate shape/strides
Handle indexing and newaxes in a slice operation
Handle slicing