From: Marek Olšák Date: Sat, 29 Jun 2019 06:25:23 +0000 (-0400) Subject: ac: destroy passes in ac_destroy_llvm_compiler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa5dab27f96cd7d3e597add1e34de39946c304cf;p=mesa.git ac: destroy passes in ac_destroy_llvm_compiler Reviewed-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index c153d60d35b..1cf51b79c76 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -356,6 +356,9 @@ fail: void ac_destroy_llvm_compiler(struct ac_llvm_compiler *compiler) { + ac_destroy_llvm_passes(compiler->passes); + ac_destroy_llvm_passes(compiler->low_opt_passes); + if (compiler->passmgr) LLVMDisposePassManager(compiler->passmgr); if (compiler->target_library_info) diff --git a/src/amd/vulkan/radv_llvm_helper.cpp b/src/amd/vulkan/radv_llvm_helper.cpp index 036368b3d7c..2b14ddcf184 100644 --- a/src/amd/vulkan/radv_llvm_helper.cpp +++ b/src/amd/vulkan/radv_llvm_helper.cpp @@ -33,7 +33,6 @@ public: ~radv_llvm_per_thread_info() { - ac_destroy_llvm_passes(passes); ac_destroy_llvm_compiler(&llvm_info); } diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 2ad164a50ac..0b3776b1f7f 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -143,8 +143,6 @@ static void si_init_compiler(struct si_screen *sscreen, static void si_destroy_compiler(struct ac_llvm_compiler *compiler) { - ac_destroy_llvm_passes(compiler->passes); - ac_destroy_llvm_passes(compiler->low_opt_passes); ac_destroy_llvm_compiler(compiler); }