[llvm] r265966 - Add code comment/NFC

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 10:13:09 PDT 2016


Author: davidxl
Date: Mon Apr 11 12:13:08 2016
New Revision: 265966

URL: http://llvm.org/viewvc/llvm-project?rev=265966&view=rev
Log:
Add code comment/NFC

Modified:
    llvm/trunk/lib/ProfileData/InstrProf.cpp

Modified: llvm/trunk/lib/ProfileData/InstrProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=265966&r1=265965&r2=265966&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProf.cpp Mon Apr 11 12:13:08 2016
@@ -398,6 +398,10 @@ uint64_t InstrProfRecord::remapValue(uin
         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




More information about the llvm-commits mailing list