[PATCH] D110859: [llvm-profgen] Support symbol list for accurate profile

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 17:29:51 PDT 2021


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:105
+  // only support for non-CS profile.
+  ProfileSymbolList SymbolList;
+  if (PopulateProfileSymbolList && OutputFormat == SPF_Ext_Binary) {
----------------
hoy wrote:
> This can be moved into the if block too.
 SymbolList is used inside `Writer.write(ProfileMap)` as a pointer, moving it into if block will causing the dangling pointer issue.


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

https://reviews.llvm.org/D110859



More information about the llvm-commits mailing list