diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-02-04 08:59:39 +0100 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-02-05 09:22:04 -0500 |
commit | 4b672b831080c5bc1d379e9645e9ccef28939b56 (patch) | |
tree | a55a2e0c9faadeef1acd3af1b55d8f2be030dd68 /src/gallium/drivers/radeon/r600_pipe_common.c | |
parent | 5aafc169ca80885ee5e6cde9f590c10a2ae629fe (diff) | |
download | external_mesa3d-4b672b831080c5bc1d379e9645e9ccef28939b56.zip external_mesa3d-4b672b831080c5bc1d379e9645e9ccef28939b56.tar.gz external_mesa3d-4b672b831080c5bc1d379e9645e9ccef28939b56.tar.bz2 |
radeonsi: Allow dumping LLVM IR before optimization passes
Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes,
to allow diagnosing problems caused by optimization passes.
Note that in order to compile the resulting IR with llc, you will first
have to run at least the mem2reg pass, e.g.
opt -mem2reg -S < shader.ll | llc -march=amdgcn -mcpu=bonaire
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> (original patch)
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (w/ debug flag)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_pipe_common.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index c827dbd..a1432ed 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -393,6 +393,7 @@ static const struct debug_named_value common_debug_options[] = { { "noir", DBG_NO_IR, "Don't print the LLVM IR"}, { "notgsi", DBG_NO_TGSI, "Don't print the TGSI"}, { "noasm", DBG_NO_ASM, "Don't print disassembled shaders"}, + { "preoptir", DBG_PREOPT_IR, "Print the LLVM IR before initial optimizations" }, /* features */ { "nodma", DBG_NO_ASYNC_DMA, "Disable asynchronous DMA" }, |