[PATCH] D44717: [InstrProf] Support for external functions in text format.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 22:03:42 PDT 2018


davidxl 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++) {
----------------
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.


Repository:
  rL LLVM

https://reviews.llvm.org/D44717





More information about the llvm-commits mailing list