[llvm] r313723 - [AMDGPU] Fixed memory leak with inliner replaced
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 23:34:28 PDT 2017
Author: rampitec
Date: Tue Sep 19 23:34:28 2017
New Revision: 313723
URL: http://llvm.org/viewvc/llvm-project?rev=313723&view=rev
Log:
[AMDGPU] Fixed memory leak with inliner replaced
Delete inliner before replacing it.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp?rev=313723&r1=313722&r2=313723&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Tue Sep 19 23:34:28 2017
@@ -337,8 +337,10 @@ void AMDGPUTargetMachine::adjustPassMana
bool AMDGPUAA = EnableAMDGPUAliasAnalysis && EnableOpt;
bool LibCallSimplify = EnableLibCallSimplify && EnableOpt;
- if (EnableAMDGPUFunctionCalls)
+ if (EnableAMDGPUFunctionCalls) {
+ delete Builder.Inliner;
Builder.Inliner = createAMDGPUFunctionInliningPass();
+ }
if (Internalize) {
// If we're generating code, we always have the whole program available. The
More information about the llvm-commits
mailing list