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

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 17:31:31 PDT 2021


hoy 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) {
----------------
wlei wrote:
> 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.
I see. Good point.


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

https://reviews.llvm.org/D110859



More information about the llvm-commits mailing list