[PATCH] D34970: [profiledata] Avoid creating a temporary vector in getNumValueData
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 3 18:04:58 PDT 2017
alexshap updated this revision to Diff 105130.
alexshap added a comment.
address comments
Repository:
rL LLVM
https://reviews.llvm.org/D34970
Files:
include/llvm/ProfileData/InstrProf.h
Index: include/llvm/ProfileData/InstrProf.h
===================================================================
--- include/llvm/ProfileData/InstrProf.h
+++ include/llvm/ProfileData/InstrProf.h
@@ -753,11 +753,8 @@
uint32_t InstrProfRecord::getNumValueData(uint32_t ValueKind) const {
uint32_t N = 0;
- const std::vector<InstrProfValueSiteRecord> &SiteRecords =
- getValueSitesForKind(ValueKind);
- for (auto &SR : SiteRecords) {
+ for (auto &SR : getValueSitesForKind(ValueKind))
N += SR.ValueData.size();
- }
return N;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34970.105130.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170704/7e36b17c/attachment.bin>
More information about the llvm-commits
mailing list