[PATCH] D118677: [llvm-profgen] Clean up unnecessary memory reservations between phases.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 15:44:57 PST 2022


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/llvm-profgen.cpp:163
+  // this point, so releasing it to reduce peak memory usage.
+  Reader.release();
   Generator->write();
----------------
hoy wrote:
> Should call `reset` instead of `release`.
OK, looks like Reader is needed by Generator->write(), especially for UnsymbolizedProfileReader, where the context strings are built inside the reader. I'll remove the release here. This is not on the critical path. The critical path is Generator->generateProfile();.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118677/new/

https://reviews.llvm.org/D118677



More information about the llvm-commits mailing list