<div dir="ltr"><div>Ping.<br><br>This was pointed out by Matt Arsenault. gallivm_compile_module calls these too.<br><br></div>Marek<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 12, 2016 at 1:26 AM, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
<br>
we should do that allegedly<br>
---<br>
 src/gallium/drivers/radeon/<wbr>radeon_setup_tgsi_llvm.c | 2 ++<br>
 1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/gallium/drivers/radeon/<wbr>radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/<wbr>radeon_setup_tgsi_llvm.c<br>
index d75311e..e04e26a 100644<br>
--- a/src/gallium/drivers/radeon/<wbr>radeon_setup_tgsi_llvm.c<br>
+++ b/src/gallium/drivers/radeon/<wbr>radeon_setup_tgsi_llvm.c<br>
@@ -1918,21 +1918,23 @@ void radeon_llvm_finalize_module(<wbr>struct radeon_llvm_context *ctx)<br>
        LLVMAddPromoteMemoryToRegister<wbr>Pass(gallivm->passmgr);<br>
<br>
        /* Add some optimization passes */<br>
        LLVMAddScalarReplAggregatesPas<wbr>s(gallivm->passmgr);<br>
        LLVMAddLICMPass(gallivm-><wbr>passmgr);<br>
        LLVMAddAggressiveDCEPass(<wbr>gallivm->passmgr);<br>
        LLVMAddCFGSimplificationPass(<wbr>gallivm->passmgr);<br>
        LLVMAddInstructionCombiningPas<wbr>s(gallivm->passmgr);<br>
<br>
        /* Run the pass */<br>
+       LLVMInitializeFunctionPassMana<wbr>ger(gallivm->passmgr);<br>
        LLVMRunFunctionPassManager(<wbr>gallivm->passmgr, ctx->main_fn);<br>
+       LLVMFinalizeFunctionPassManage<wbr>r(gallivm->passmgr);<br>
<br>
        LLVMDisposeBuilder(gallivm-><wbr>builder);<br>
        LLVMDisposePassManager(<wbr>gallivm->passmgr);<br>
        gallivm_dispose_target_<wbr>library_info(target_library_<wbr>info);<br>
 }<br>
<br>
 void radeon_llvm_dispose(struct radeon_llvm_context *ctx)<br>
 {<br>
        LLVMDisposeModule(ctx->soa.<wbr>bld_base.base.gallivm->module)<wbr>;<br>
        LLVMContextDispose(ctx->soa.<wbr>bld_base.base.gallivm-><wbr>context);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
</font></span></blockquote></div><br></div>