freedreno/ir3: fix register usage calculations
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_debug.h
index 583e6132b4b3b505b24efea072682e3aeab4bf74..321e09d56b987a5700607e71fae719f4e0d009fc 100644 (file)
 #define LP_BLD_DEBUG_H
 
 
-#include <llvm-c/Core.h>
+#include "gallivm/lp_bld.h"
 
 #include "pipe/p_compiler.h"
 #include "util/u_string.h"
 
 
+#define GALLIVM_DEBUG_TGSI          (1 << 0)
+#define GALLIVM_DEBUG_IR            (1 << 1)
+#define GALLIVM_DEBUG_ASM           (1 << 2)
+#define GALLIVM_DEBUG_NO_OPT        (1 << 3)
+#define GALLIVM_DEBUG_PERF          (1 << 4)
+#define GALLIVM_DEBUG_NO_BRILINEAR  (1 << 5)
+#define GALLIVM_DEBUG_NO_RHO_APPROX (1 << 6)
+#define GALLIVM_DEBUG_NO_QUAD_LOD   (1 << 7)
+#define GALLIVM_DEBUG_GC            (1 << 8)
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef DEBUG
+extern unsigned gallivm_debug;
+#else
+#define gallivm_debug 0
+#endif
+
+
 static INLINE void
 lp_build_name(LLVMValueRef val, const char *format, ...)
 {
@@ -53,12 +76,29 @@ lp_build_name(LLVMValueRef val, const char *format, ...)
 }
 
 
+const char *
+lp_get_module_id(LLVMModuleRef module);
+
+
+void
+lp_debug_dump_value(LLVMValueRef value);
+
+
 boolean
 lp_check_alignment(const void *ptr, unsigned alignment);
 
 
 void
-lp_disassemble(const void* func);
+lp_disassemble(LLVMValueRef func, const void *code);
+
+
+void
+lp_profile(LLVMValueRef func, const void *code);
+
+
+#ifdef __cplusplus
+}
+#endif
 
 
 #endif /* !LP_BLD_DEBUG_H */