summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-10-16 16:34:16 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2018-03-14 09:04:01 +0100
commitee4e07eaa5d3f5cbbaec4a36835c973a4b4c57aa (patch)
tree4100bb991b9e495927ea47e715a5a7ebcda6d1bb
parent6179179b42153392825b5f9c26bde0f54bd3c784 (diff)
gallium/radeon: add EarlyCSE pass
This helps to get rid of all the back-and-forth casting with 64-bit ints and doubles, and so exposes more optimization opportunities. TODO test with shader-db
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
index c8ac8548b4..fcfb772eaf 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -1232,6 +1232,7 @@ void si_llvm_optimize_module(struct si_shader_context *ctx)
/* Add some optimization passes */
LLVMAddScalarReplAggregatesPass(gallivm->passmgr);
+ LLVMAddEarlyCSEPass(gallivm->passmgr);
LLVMAddLICMPass(gallivm->passmgr);
LLVMAddAggressiveDCEPass(gallivm->passmgr);
LLVMAddCFGSimplificationPass(gallivm->passmgr);