[PATCH] D40873: [PGO] handle infinite loop properly in pgo instrumention
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 16:34:08 PST 2017
davidxl created this revision.
Herald added a subscriber: sanjoy.
The original fix id https://reviews.llvm.org/D40702 introduces a memory leak -- a surprising side effect of calling 'getAnalysis<>' method. Calling this has the effect of releasing the memory of current BFI and BPI.
The right way is to get the cached BPI and LI from the current BFI.
https://reviews.llvm.org/D40873
Files:
include/llvm/Analysis/BlockFrequencyInfo.h
include/llvm/Analysis/BlockFrequencyInfoImpl.h
lib/Analysis/BlockFrequencyInfo.cpp
lib/Transforms/Instrumentation/CFGMST.h
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40873.125650.patch
Type: text/x-patch
Size: 9746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171206/7e0d1a70/attachment-0001.bin>
More information about the llvm-commits
mailing list