freedreno/ir3: fix register usage calculations
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_init.h
index 6a8ab8e5db9f96bd87811a2ec2698776bca1b45b..9e50f88931d07469f15266e12600381bda7d37bd 100644 (file)
 #define LP_BLD_INIT_H
 
 
-#include "llvm/Config/config.h"
+#include "pipe/p_compiler.h"
+#include "util/u_pointer.h" // for func_pointer
+#include "lp_bld.h"
+#include <llvm-c/ExecutionEngine.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
 
+struct gallivm_state
+{
+   LLVMModuleRef module;
+   LLVMExecutionEngineRef engine;
+   LLVMTargetDataRef target;
+   LLVMPassManagerRef passmgr;
+   LLVMContextRef context;
+   LLVMBuilderRef builder;
+   LLVMMCJITMemoryManagerRef memorymgr;
+   struct lp_generated_code *code;
+   unsigned compiled;
+};
 
-#ifndef LLVM_NATIVE_ARCH
+
+boolean
+lp_build_init(void);
+
+
+struct gallivm_state *
+gallivm_create(const char *name, LLVMContextRef context);
 
 void
-LLVMLinkInJIT(void);
+gallivm_destroy(struct gallivm_state *gallivm);
 
-int
-LLVMInitializeNativeTarget(void);
+void
+gallivm_free_ir(struct gallivm_state *gallivm);
 
-#endif /* !LLVM_NATIVE_ARCH */
+void
+gallivm_verify_function(struct gallivm_state *gallivm,
+                        LLVMValueRef func);
 
+void
+gallivm_compile_module(struct gallivm_state *gallivm);
+
+func_pointer
+gallivm_jit_function(struct gallivm_state *gallivm,
+                     LLVMValueRef func);
 
-#ifdef __cplusplus
-}
-#endif
+void
+lp_set_load_alignment(LLVMValueRef Inst,
+                       unsigned Align);
 
+void
+lp_set_store_alignment(LLVMValueRef Inst,
+                      unsigned Align);
 
 #endif /* !LP_BLD_INIT_H */