summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2016-05-10 03:48:13 +0200
committerRoland Scheidegger <[email protected]>2016-05-10 17:08:16 +0200
commite4cf8717de39a5344ae60dbed4ed8fddf9ebfee1 (patch)
tree242c283fd83440c3c46f6b5fda6368d548fd08cf /src/gallium/auxiliary/gallivm
parent5c200894c80b3e9ae3519ded9cc1b311e79c0e24 (diff)
gallivm: print declarations of intrinsics with GALLIVM_DEBUG=ir
Those aren't really interesting, however outputting them is helpful when trying to feed the IR to llvm llc (or opt) for debugging. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_intr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
index f806503038d..0a8f996a63e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
@@ -51,6 +51,7 @@
#include "lp_bld_intr.h"
#include "lp_bld_type.h"
#include "lp_bld_pack.h"
+#include "lp_bld_debug.h"
void
@@ -146,6 +147,10 @@ lp_build_intrinsic(LLVMBuilderRef builder,
if (attr)
LLVMAddFunctionAttr(function, attr);
+
+ if (gallivm_debug & GALLIVM_DEBUG_IR) {
+ lp_debug_dump_value(function);
+ }
}
return LLVMBuildCall(builder, function, args, num_args, "");