summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStéphane Marchesin <[email protected]>2013-05-05 04:34:40 -0700
committerStéphane Marchesin <[email protected]>2013-05-08 22:05:54 -0700
commit1c56fc1025e14827b69e4dd354aea4c9e487c0dd (patch)
treefdc79747a2a82935f452fc72d4ea0ee5b4b3eeb0 /src
parent0b0d6f97cfac75524470c895be686b69d67f050f (diff)
draw/llvm: Add additional llvm optimization passes
It helps a bit with vertex shader performance on i915g (a couple percent faster with openarena). I have tried most other passes, and they weren't showing any measurable improvement. Note that my vertex shaders didn't have loops, so maybe the loop optimizations could still be useful in the future. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 673c16e6762..4a428ee02ad 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -147,7 +147,10 @@ create_pass_manager(struct gallivm_state *gallivm)
* but there are more on SVN.
* TODO: Add more passes.
*/
+ LLVMAddScalarReplAggregatesPass(gallivm->passmgr);
+ LLVMAddLICMPass(gallivm->passmgr);
LLVMAddCFGSimplificationPass(gallivm->passmgr);
+ LLVMAddReassociatePass(gallivm->passmgr);
if (HAVE_LLVM >= 0x207 && sizeof(void*) == 4) {
/* For LLVM >= 2.7 and 32-bit build, use this order of passes to