[Mesa-dev] [PATCH] radeonsi: initialize and finalize the LLVM function pass manager

Marek Olšák maraeo at gmail.com
Thu Aug 18 14:38:32 UTC 2016


Ping.

This was pointed out by Matt Arsenault. gallivm_compile_module calls these
too.

Marek

On Fri, Aug 12, 2016 at 1:26 AM, Marek Olšák <maraeo at gmail.com> wrote:

> From: Marek Olšák <marek.olsak at amd.com>
>
> we should do that allegedly
> ---
>  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 d75311e..e04e26a 100644
> --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
> +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
> @@ -1918,21 +1918,23 @@ void radeon_llvm_finalize_module(struct
> radeon_llvm_context *ctx)
>         LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr);
>
>         /* Add some optimization passes */
>         LLVMAddScalarReplAggregatesPass(gallivm->passmgr);
>         LLVMAddLICMPass(gallivm->passmgr);
>         LLVMAddAggressiveDCEPass(gallivm->passmgr);
>         LLVMAddCFGSimplificationPass(gallivm->passmgr);
>         LLVMAddInstructionCombiningPass(gallivm->passmgr);
>
>         /* Run the pass */
> +       LLVMInitializeFunctionPassManager(gallivm->passmgr);
>         LLVMRunFunctionPassManager(gallivm->passmgr, ctx->main_fn);
> +       LLVMFinalizeFunctionPassManager(gallivm->passmgr);
>
>         LLVMDisposeBuilder(gallivm->builder);
>         LLVMDisposePassManager(gallivm->passmgr);
>         gallivm_dispose_target_library_info(target_library_info);
>  }
>
>  void radeon_llvm_dispose(struct radeon_llvm_context *ctx)
>  {
>         LLVMDisposeModule(ctx->soa.bld_base.base.gallivm->module);
>         LLVMContextDispose(ctx->soa.bld_base.base.gallivm->context);
> --
> 2.7.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160818/80187c25/attachment-0001.html>


More information about the mesa-dev mailing list