Mesa (master): radeon/llvm: enable LICM and DCE pass v2

Christian König deathsimple at kemper.freedesktop.org
Thu Mar 7 09:07:45 UTC 2013


Module: Mesa
Branch: master
Commit: a7a899584cf855725d3ca37f128bcd41b719e248
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7a899584cf855725d3ca37f128bcd41b719e248

Author: Christian König <christian.koenig at amd.com>
Date:   Wed Feb 27 22:40:24 2013 +0100

radeon/llvm: enable LICM and DCE pass v2

LICM stands for Loop Invariant Code Motion. Instructions that
does not depend of loop index are moved outside of loop body.

DCE is DeadCodeElimination.

v2: updated commit msg, thx to Vincent.

Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Vincent Lejeune <vljn at ovi.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

---

 .../drivers/radeon/radeon_setup_tgsi_llvm.c        |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index f7b7586..f017b87 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -1281,6 +1281,8 @@ void radeon_llvm_finalize_module(struct radeon_llvm_context * ctx)
 
 	/* Add some optimization passes */
 	LLVMAddScalarReplAggregatesPass(gallivm->passmgr);
+	LLVMAddLICMPass(gallivm->passmgr);
+	LLVMAddAggressiveDCEPass(gallivm->passmgr);
 	LLVMAddCFGSimplificationPass(gallivm->passmgr);
 
 	/* Run the passs */




More information about the mesa-commit mailing list