[Mesa-dev] [PATCH] draw/llvm: Add additional llvm optimization passes
Brian Paul
brianp at vmware.com
Wed May 8 07:28:31 PDT 2013
On 05/08/2013 03:14 AM, Stéphane Marchesin wrote:
> 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.
> ---
> src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 +++
> 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 673c16e..4a428ee 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
Reviewed-by: Brian Paul <brianp at vmware.com>
We should probably give these a try with llvmpipe too...
-Brian
More information about the mesa-dev
mailing list