projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b77365b
)
[PGO] Do not attach VP metadata if value count at site is 0 [NFC]
author
Betul Buyukkurt
<betulb@codeaurora.org>
Thu, 14 Apr 2016 16:25:45 +0000
(16:25 +0000)
committer
Betul Buyukkurt
<betulb@codeaurora.org>
Thu, 14 Apr 2016 16:25:45 +0000
(16:25 +0000)
llvm-svn: 266335
llvm/lib/ProfileData/InstrProf.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/ProfileData/InstrProf.cpp
b/llvm/lib/ProfileData/InstrProf.cpp
index
7f4a87a
..
f1a6ce9
100644
(file)
--- a/
llvm/lib/ProfileData/InstrProf.cpp
+++ b/
llvm/lib/ProfileData/InstrProf.cpp
@@
-636,6
+636,8
@@
void annotateValueSite(Module &M, Instruction &Inst,
InstrProfValueKind ValueKind, uint32_t SiteIdx,
uint32_t MaxMDCount) {
uint32_t NV = InstrProfR.getNumValueDataForSite(ValueKind, SiteIdx);
+ if (!NV)
+ return;
uint64_t Sum = 0;
std::unique_ptr<InstrProfValueData[]> VD =