[llvm] 96c4460 - [ARM][MachineOutliner] Fix memory leak.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 09:48:42 PDT 2020


Awesome, thanks!

On Thu, Jun 4, 2020 at 4:22 AM Yvan Roux <yvan.roux at linaro.org> wrote:
>
> Hi David,
>
> I pushed the change as https://github.com/llvm/llvm-project/commit/6b9e1022436336b4ee7fa425f641f1cdcbd8f839
>
> Thanks
> Yvan
>
>
> On Mon, 1 Jun 2020 at 20:41, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> Ping
>>
>> On Tue, May 19, 2020 at 11:41 AM David Blaikie <dblaikie at gmail.com> wrote:
>> >
>> > Ah, thanks!
>> >
>> > Could it be taken a step further and statically allocated instead of dynamically allocated?
>> > Replacing:
>> > auto Costs = std::make_unique<OutlinerCosts>(Subtarget);
>> > with:
>> > OutlinerCosts Costs(Subtarget);
>> >
>> > ?
>> > On Mon, May 18, 2020 at 11:36 PM Yvan Roux <yvan.roux at linaro.org> wrote:
>> >>
>> >> Hi David,
>> >>
>> >> On Mon, 18 May 2020 at 21:50, David Blaikie <dblaikie at gmail.com> wrote:
>> >>>
>> >>> Any chance of using unique_ptr (or non-dynamic allocation), etc, to simplify this memory management?
>> >>
>> >>
>> >> Yes I replaced it by make_unique shorty after this commit here:
>> >> https://github.com/llvm/llvm-project/commit/3648dde3ddd3cc0ba862017d494b7ede6054631c
>> >>
>> >> Cheers,
>> >> Yvan
>> >>
>> >>>
>> >>>
>> >>> On Fri, May 15, 2020 at 7:27 AM Yvan Roux via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>> >>>>
>> >>>>
>> >>>> Author: Yvan Roux
>> >>>> Date: 2020-05-15T16:27:14+02:00
>> >>>> New Revision: 96c4460a0be6f5f66a02eac7fe796e49768001a4
>> >>>>
>> >>>> URL: https://github.com/llvm/llvm-project/commit/96c4460a0be6f5f66a02eac7fe796e49768001a4
>> >>>> DIFF: https://github.com/llvm/llvm-project/commit/96c4460a0be6f5f66a02eac7fe796e49768001a4.diff
>> >>>>
>> >>>> LOG: [ARM][MachineOutliner] Fix memory leak.
>> >>>>
>> >>>> Fix sanitizer bots after 0e4827aa4e4ae25813f66d3b872db67d93813009
>> >>>>
>> >>>> Added:
>> >>>>
>> >>>>
>> >>>> Modified:
>> >>>>     llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
>> >>>>
>> >>>> Removed:
>> >>>>
>> >>>>
>> >>>>
>> >>>> ################################################################################
>> >>>> diff  --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
>> >>>> index c160843fcdba..20df55f55bc8 100644
>> >>>> --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
>> >>>> +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
>> >>>> @@ -5668,6 +5668,7 @@ outliner::OutlinedFunction ARMBaseInstrInfo::getOutliningCandidateInfo(
>> >>>>    } else
>> >>>>      return outliner::OutlinedFunction();
>> >>>>
>> >>>> +  delete Costs;
>> >>>>    return outliner::OutlinedFunction(RepeatedSequenceLocs, SequenceSize,
>> >>>>                                      NumBytesToCreateFrame, FrameID);
>> >>>>  }
>> >>>>
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> llvm-commits mailing list
>> >>>> llvm-commits at lists.llvm.org
>> >>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list