[PATCH] D95929: [CSSPGO][llvm-profgen] Add brackets for context id to support extended binary format
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 2 09:54:11 PDT 2021
wenlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:392
+ for (const auto &Item : ProfileMap) {
+ std::string ContextWithBracket = "[" + Item.first().str() + "]";
+ auto Ret = CxtWithBracketPMap.try_emplace(ContextWithBracket, Item.second);
----------------
This seems problematic, the string could get destructed while we still keep the StringRef for it in FunctionSamples's name and context..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95929/new/
https://reviews.llvm.org/D95929
More information about the llvm-commits
mailing list