radeonsi: initialize and finalize the LLVM function pass manager
authorMarek Olšák <marek.olsak@amd.com>
Thu, 11 Aug 2016 22:57:30 +0000 (00:57 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 18 Aug 2016 19:36:03 +0000 (21:36 +0200)
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c

index 8076443f081102b96777895ded3feed5f0bb563e..71f52fddbd3776445c5e909aa0785b8a76f88fde 100644 (file)
@@ -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);