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 <jfonseca@vmware.com>
This commit is contained in:
parent
5c200894c8
commit
e4cf8717de
|
@ -51,6 +51,7 @@
|
||||||
#include "lp_bld_intr.h"
|
#include "lp_bld_intr.h"
|
||||||
#include "lp_bld_type.h"
|
#include "lp_bld_type.h"
|
||||||
#include "lp_bld_pack.h"
|
#include "lp_bld_pack.h"
|
||||||
|
#include "lp_bld_debug.h"
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -146,6 +147,10 @@ lp_build_intrinsic(LLVMBuilderRef builder,
|
||||||
|
|
||||||
if (attr)
|
if (attr)
|
||||||
LLVMAddFunctionAttr(function, attr);
|
LLVMAddFunctionAttr(function, attr);
|
||||||
|
|
||||||
|
if (gallivm_debug & GALLIVM_DEBUG_IR) {
|
||||||
|
lp_debug_dump_value(function);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return LLVMBuildCall(builder, function, args, num_args, "");
|
return LLVMBuildCall(builder, function, args, num_args, "");
|
||||||
|
|
Loading…
Reference in New Issue