[PATCH] D44717: [InstrProf] Support for external functions in text format.
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 20 22:37:38 PDT 2018
mtrofin added inline comments.
================
Comment at: lib/ProfileData/InstrProfWriter.cpp:361
OS << ND << "\n";
std::unique_ptr<InstrProfValueData[]> VD = Func.getValueForSite(VK, S);
for (uint32_t I = 0; I < ND; I++) {
----------------
davidxl wrote:
> What I suggested is that instead of emitting a fake target with a name that may collide with a real function, just skip the target (or better emit some comments here). Of course, the value of ND needs to be precomputed/adjusted first.
Wouldn't we lose a counter value in that case? (which would shift thresholds, for example)
I share the concern of potential (albeit low probability) name collision. How about building a name using invalid characters, such as space - since the reader matches on ':' (so the external symbol name could be "External Symbol")
Repository:
rL LLVM
https://reviews.llvm.org/D44717
More information about the llvm-commits
mailing list