[PATCH] D34970: [profiledata] Avoid creating a temporary vector in getNumValueData
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 4 18:21:27 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL307113: [profiledata] Avoid creating a temporary vector in getNumValueData (authored by alexshap).
Changed prior to commit:
https://reviews.llvm.org/D34970?vs=105130&id=105205#toc
Repository:
rL LLVM
https://reviews.llvm.org/D34970
Files:
llvm/trunk/include/llvm/ProfileData/InstrProf.h
Index: llvm/trunk/include/llvm/ProfileData/InstrProf.h
===================================================================
--- llvm/trunk/include/llvm/ProfileData/InstrProf.h
+++ llvm/trunk/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.105205.patch
Type: text/x-patch
Size: 582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170705/0da4b87d/attachment-0001.bin>
More information about the llvm-commits
mailing list