Go to the documentation of this file. 1 #ifndef HALIDE_CODEGEN_POSIX_H
2 #define HALIDE_CODEGEN_POSIX_H
34 llvm::Value *
ptr =
nullptr;
73 std::vector<Allocation> free_stack_allocs;
77 size_t cur_stack_alloc_total{0};
83 llvm::Value *codegen_allocation_size(
const std::string &name,
Type type,
const std::vector<Expr> &extents,
const Expr &condition);
98 Allocation create_allocation(
const std::string &name,
Type type,
MemoryType memory_type,
99 const std::vector<Expr> &extents,
const Expr &condition,
100 const Expr &new_expr, std::string free_function,
int padding);
104 void free_allocation(
const std::string &name);
Allocate a scratch area called with the given name, type, and size.
std::string get_allocation_name(const std::string &n) override
Get a unique name for the actual block of memory that an allocate node uses.
A code generator abstract base class.
llvm::Value * ptr
The memory.
llvm::Function * destructor_function
Function to accomplish the destruction.
A code generator that emits posix code from a given Halide stmt.
void visit(const Allocate *) override
Posix implementation of Allocate.
A common pattern when traversing Halide IR is that you need to keep track of stuff when you find a Le...
A struct describing heap or stack allocations.
Types in the halide type system.
Free the resources associated with the given buffer.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
CodeGen_Posix(const Target &t)
Create an posix code generator.
@ Internal
Not visible externally, similar to 'static' linkage in C.
llvm::Value * destructor
Destructor stack slot for this allocation.
Type type
The (Halide) type of the allocation.
std::string name
A unique name for this allocation.
void visit(const IntImm *) override
Generate code for various IR nodes.
Scope< Allocation > allocations
The allocations currently in scope.
int constant_bytes
How many bytes this allocation is, or 0 if not constant.
llvm::Value * pseudostack_slot
Pseudostack slot for this allocation.
A fragment of Halide syntax.
int stack_bytes
How many bytes of stack space used.
MemoryType
An enum describing different address spaces to be used with Func::store_in.
A struct representing a target machine and os to generate code for.