From: Christian König Date: Wed, 27 Feb 2013 21:40:24 +0000 (+0100) Subject: radeon/llvm: enable LICM and DCE pass v2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7a899584cf855725d3ca37f128bcd41b719e248;p=mesa.git 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 Reviewed-by: Vincent Lejeune Reviewed-by: Tom Stellard --- diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index f7b758670dd..f017b873217 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 */