[Mesa-dev] [PATCH] radeonsi: call LLVMAddEarlyCSEMemSSAPass only for LLVM >= 4.0

Marek Olšák maraeo at gmail.com
Thu Jun 8 21:33:21 UTC 2017


Pushed, thanks!

Marek

On Thu, Jun 8, 2017 at 9:22 PM, Juan A. Suarez Romero
<jasuarez at igalia.com> wrote:
> LLVMAddEarlyCSEMemSSAPass() is defined in LLVM 4.0.
>
> Fixes: 257b538 ("radeonsi: do EarlyCSEMemSSA LLVM pass)
> ---
>  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> index 802e2b9..d5e988e 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> @@ -1451,8 +1451,10 @@ void si_llvm_optimize_module(struct si_shader_context *ctx)
>         LLVMAddLICMPass(gallivm->passmgr);
>         LLVMAddAggressiveDCEPass(gallivm->passmgr);
>         LLVMAddCFGSimplificationPass(gallivm->passmgr);
> +#if HAVE_LLVM >= 0x0400
>         /* This is recommended by the instruction combining pass. */
>         LLVMAddEarlyCSEMemSSAPass(gallivm->passmgr);
> +#endif
>         LLVMAddInstructionCombiningPass(gallivm->passmgr);
>
>         /* Run the pass */
> --
> 2.9.4
>


More information about the mesa-dev mailing list