gallivm: Setup a global optimization pass.
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_type.h
index 4daa904e633c8e73457236e190c48c1964c5a6e9..df77ef2155130cd3341cbcf4fe10f29e646fe977 100644 (file)
@@ -37,9 +37,9 @@
 #define LP_BLD_TYPE_H
 
 
-#include <llvm-c/Core.h>  
+#include "pipe/p_compiler.h"
+#include "gallivm/lp_bld.h"
 
-#include <pipe/p_compiler.h>
 
 
 /**
@@ -128,6 +128,18 @@ struct lp_build_context
     */
    struct lp_type type;
 
+   /** Same as lp_build_undef(type) */
+   LLVMTypeRef elem_type;
+
+   /** Same as lp_build_undef(type) */
+   LLVMTypeRef vec_type;
+
+   /** Same as lp_build_undef(type) */
+   LLVMTypeRef int_elem_type;
+
+   /** Same as lp_build_undef(type) */
+   LLVMTypeRef int_vec_type;
+
    /** Same as lp_build_undef(type) */
    LLVMValueRef undef;
 
@@ -316,6 +328,18 @@ struct lp_type
 lp_wider_type(struct lp_type type);
 
 
+unsigned
+lp_sizeof_llvm_type(LLVMTypeRef t);
+
+
+const char *
+lp_typekind_name(LLVMTypeKind t);
+
+
+void
+lp_dump_llvmtype(LLVMTypeRef t);
+
+
 void
 lp_build_context_init(struct lp_build_context *bld,
                       LLVMBuilderRef builder,