diff options
author | Christian König <[email protected]> | 2013-02-27 22:40:24 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2013-03-07 10:03:22 +0100 |
commit | a7a899584cf855725d3ca37f128bcd41b719e248 (patch) | |
tree | 5c6b1ea69af7b47321bdfb8341fa1b5ae55f912f /src | |
parent | e4188ee13d7101657e7e9c91ee9ade3b98953c9f (diff) |
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 <[email protected]>
Reviewed-by: Vincent Lejeune <vljn at ovi.com>
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/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 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 */ |