summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 972e9e81704..e7e6753f9b3 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -599,6 +599,13 @@ void annotateValueSite(Module &M, Instruction &Inst,
std::unique_ptr<InstrProfValueData[]> VD =
InstrProfR.getValueForSite(ValueKind, SiteIdx, &Sum);
+ annotateValueSite(M, Inst, VD.get(), NV, Sum, ValueKind, MaxMDCount);
+}
+
+void annotateValueSite(Module &M, Instruction &Inst,
+ const InstrProfValueData VD[], uint32_t NV,
+ uint64_t Sum, InstrProfValueKind ValueKind,
+ uint32_t MaxMDCount) {
LLVMContext &Ctx = M.getContext();
MDBuilder MDHelper(Ctx);
SmallVector<Metadata *, 3> Vals;
OpenPOWER on IntegriCloud