From aa5dab27f96cd7d3e597add1e34de39946c304cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 29 Jun 2019 02:25:23 -0400 Subject: [PATCH] ac: destroy passes in ac_destroy_llvm_compiler Reviewed-by: Pierre-Eric Pelloux-Prayer --- src/amd/common/ac_llvm_util.c | 3 +++ src/amd/vulkan/radv_llvm_helper.cpp | 1 - src/gallium/drivers/radeonsi/si_pipe.c | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.30.2