X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fgallivm%2Flp_bld_init.h;h=f68bf75a8515df54506f97430b8ff914c84bacb1;hb=636d01bd61cac83e13c3c64874e7e34e828ca93a;hp=07f50d1c43391e2f8040d46b16eba7eb7885deaf;hpb=a8238bb08a95e7ea4430450c304a6bee210df1a6;p=mesa.git diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h index 07f50d1c433..f68bf75a851 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h @@ -30,18 +30,56 @@ #define LP_BLD_INIT_H -#ifdef __cplusplus -extern "C" { -#endif +#include "pipe/p_compiler.h" +#include "lp_bld.h" +#include + + +struct gallivm_state +{ + LLVMModuleRef module; + LLVMExecutionEngineRef engine; + LLVMModuleProviderRef provider; + LLVMTargetDataRef target; + LLVMPassManagerRef passmgr; + LLVMContextRef context; + LLVMBuilderRef builder; +}; void lp_build_init(void); -#ifdef __cplusplus -} -#endif +extern void +lp_func_delete_body(LLVMValueRef func); + + +void +gallivm_garbage_collect(struct gallivm_state *gallivm); + + +typedef void (*garbage_collect_callback_func)(void *cb_data); + +void +gallivm_register_garbage_collector_callback(garbage_collect_callback_func func, + void *cb_data); + +void +gallivm_remove_garbage_collector_callback(garbage_collect_callback_func func, + void *cb_data); + + +struct gallivm_state * +gallivm_create(void); + +void +gallivm_destroy(struct gallivm_state *gallivm); + + +extern LLVMValueRef +lp_build_load_volatile(LLVMBuilderRef B, LLVMValueRef PointerVal, + const char *Name); #endif /* !LP_BLD_INIT_H */