diff options
author | Rong Xu <xur@google.com> | 2016-02-12 21:36:17 +0000 |
---|---|---|
committer | Rong Xu <xur@google.com> | 2016-02-12 21:36:17 +0000 |
commit | bb49490de1dea43b036ecb9db09b4e6cce0b04b6 (patch) | |
tree | df6a4a281efede228f3947dcc306b9109955ae32 /llvm/lib | |
parent | a6771b37f814b6c5d3f547323d9c49babef4844b (diff) | |
download | bcm5719-llvm-bb49490de1dea43b036ecb9db09b4e6cce0b04b6.tar.gz bcm5719-llvm-bb49490de1dea43b036ecb9db09b4e6cce0b04b6.zip |
[PGO] Add another interface for annotateValueSite
Add another interface to function annotateValueSite() which directly uses the
VauleData array.
Differential Revision: http://reviews.llvm.org/D17108
llvm-svn: 260741
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/ProfileData/InstrProf.cpp | 7 |
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; |