From: Marek Olšák Date: Thu, 11 Aug 2016 22:57:30 +0000 (+0200) Subject: radeonsi: initialize and finalize the LLVM function pass manager X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07ccec002b5631da7fa568a332bfb2143adb4f89;p=mesa.git radeonsi: initialize and finalize the LLVM function pass manager Reviewed-by: Tom Stellard --- diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index 8076443f081..71f52fddbd3 100644 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c @@ -2047,7 +2047,9 @@ void radeon_llvm_finalize_module(struct radeon_llvm_context *ctx) LLVMAddInstructionCombiningPass(gallivm->passmgr); /* Run the pass */ + LLVMInitializeFunctionPassManager(gallivm->passmgr); LLVMRunFunctionPassManager(gallivm->passmgr, ctx->main_fn); + LLVMFinalizeFunctionPassManager(gallivm->passmgr); LLVMDisposeBuilder(gallivm->builder); LLVMDisposePassManager(gallivm->passmgr);