X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fgallivm%2Flp_bld_debug.h;h=1ea13326458089f7754531ba61ac0dda2b4419b3;hb=085c3abf27082f72978e011a652a5ece2f518099;hp=eb11dcd4ef4de25455ca2547af8ba0d031312761;hpb=4926c5748028d33da4808f8a5473aa7b2f2bdc62;p=mesa.git diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.h b/src/gallium/auxiliary/gallivm/lp_bld_debug.h index eb11dcd4ef4..1ea13326458 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.h @@ -39,10 +39,22 @@ #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_PERF (1 << 3) +#define GALLIVM_DEBUG_GC (1 << 4) +#define GALLIVM_DEBUG_DUMP_BC (1 << 5) + +#define GALLIVM_PERF_NO_BRILINEAR (1 << 0) +#define GALLIVM_PERF_NO_RHO_APPROX (1 << 1) +#define GALLIVM_PERF_NO_QUAD_LOD (1 << 2) +#define GALLIVM_PERF_NO_OPT (1 << 3) +#define GALLIVM_PERF_NO_AOS_SAMPLING (1 << 4) + +#ifdef __cplusplus +extern "C" { +#endif + +extern unsigned gallivm_perf; #ifdef DEBUG extern unsigned gallivm_debug; @@ -51,14 +63,14 @@ extern unsigned gallivm_debug; #endif -static INLINE void +static inline void lp_build_name(LLVMValueRef val, const char *format, ...) { #ifdef DEBUG char name[32]; va_list ap; va_start(ap, format); - util_vsnprintf(name, sizeof name, format, ap); + vsnprintf(name, sizeof name, format, ap); va_end(ap); LLVMSetValueName(val, name); #else @@ -77,7 +89,16 @@ 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 */