From a7a899584cf855725d3ca37f128bcd41b719e248 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Wed, 27 Feb 2013 22:40:24 +0100 Subject: [PATCH] radeon/llvm: enable LICM and DCE pass v2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 2 ++ 1 file changed, 2 insertions(+) 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 */ -- 2.30.2