[PATCH] D102039: [profile] WIP Add binary id into profiles
Gulfem Savrun Yeniceri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 16 16:06:38 PDT 2021
gulfem marked 4 inline comments as done.
gulfem added inline comments.
================
Comment at: llvm/lib/ProfileData/InstrProfReader.cpp:534
+const BinaryIdTy *RawInstrProfReader<IntPtrT>::getBinaryIds() {
+ return new BinaryIdTy(BinaryIdsSize, BinaryIdsStart);
+}
----------------
phosek wrote:
> Where is this deallocated? It seems like this memory gets leaked. `BinaryIdTy` is just a plain struct with just two 8 byte fields (on a 64-bit machine), can we avoid allocating it on the heap and return/pass it by value to simplify lifetime management?
I used `unique_ptr`, so memory will be released after BinaryIdTy goes out of scope.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102039/new/
https://reviews.llvm.org/D102039
More information about the llvm-commits
mailing list