diff options
author | Xinliang David Li <davidxl@google.com> | 2016-04-11 17:13:08 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-04-11 17:13:08 +0000 |
commit | 8dd4ca819b941237802f361b37614fe91742f0a7 (patch) | |
tree | 0bfb3a205ac877321fd8f2ed1310238730f3ad1d | |
parent | 371290790f79d95c32eb8fef3f315c2dd9ee359e (diff) | |
download | bcm5719-llvm-8dd4ca819b941237802f361b37614fe91742f0a7.tar.gz bcm5719-llvm-8dd4ca819b941237802f361b37614fe91742f0a7.zip |
Add code comment/NFC
llvm-svn: 265966
-rw-r--r-- | llvm/lib/ProfileData/InstrProf.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index 7e043e3792a..7f4a87a14ee 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -398,6 +398,10 @@ uint64_t InstrProfRecord::remapValue(uint64_t Value, uint32_t ValueKind, std::lower_bound(ValueMap->begin(), ValueMap->end(), Value, [](const std::pair<uint64_t, uint64_t> &LHS, uint64_t RHS) { return LHS.first < RHS; }); + // Raw function pointer collected by value profiler may be from + // external functions that are not instrumented. They won't have + // mapping data to be used by the deserializer. Force the value to + // be 0 in this case. if (Result != ValueMap->end() && Result->first == Value) Value = (uint64_t)Result->second; else |