@@ -857,20 +857,6 @@ struct InstrProfRecord {
857857 inline ArrayRef<InstrProfValueData> getValueArrayForSite (uint32_t ValueKind,
858858 uint32_t Site) const ;
859859
860- // / Return the number of value data collected for ValueKind at profiling
861- // / site: Site.
862- inline uint32_t getNumValueDataForSite (uint32_t ValueKind,
863- uint32_t Site) const ;
864-
865- // / Return the array of profiled values at \p Site.
866- inline std::unique_ptr<InstrProfValueData[]>
867- getValueForSite (uint32_t ValueKind, uint32_t Site) const ;
868-
869- // / Get the target value/counts of kind \p ValueKind collected at site
870- // / \p Site and store the result in array \p Dest.
871- inline void getValueForSite (InstrProfValueData Dest[], uint32_t ValueKind,
872- uint32_t Site) const ;
873-
874860 // / Reserve space for NumValueSites sites.
875861 inline void reserveSites (uint32_t ValueKind, uint32_t NumValueSites);
876862
@@ -1048,38 +1034,11 @@ uint32_t InstrProfRecord::getNumValueSites(uint32_t ValueKind) const {
10481034 return getValueSitesForKind (ValueKind).size ();
10491035}
10501036
1051- uint32_t InstrProfRecord::getNumValueDataForSite (uint32_t ValueKind,
1052- uint32_t Site) const {
1053- return getValueSitesForKind (ValueKind)[Site].ValueData .size ();
1054- }
1055-
10561037ArrayRef<InstrProfValueData>
10571038InstrProfRecord::getValueArrayForSite (uint32_t ValueKind, uint32_t Site) const {
10581039 return getValueSitesForKind (ValueKind)[Site].ValueData ;
10591040}
10601041
1061- std::unique_ptr<InstrProfValueData[]>
1062- InstrProfRecord::getValueForSite (uint32_t ValueKind, uint32_t Site) const {
1063- uint32_t N = getNumValueDataForSite (ValueKind, Site);
1064- if (N == 0 )
1065- return std::unique_ptr<InstrProfValueData[]>(nullptr );
1066-
1067- auto VD = std::make_unique<InstrProfValueData[]>(N);
1068- getValueForSite (VD.get (), ValueKind, Site);
1069-
1070- return VD;
1071- }
1072-
1073- void InstrProfRecord::getValueForSite (InstrProfValueData Dest[],
1074- uint32_t ValueKind, uint32_t Site) const {
1075- uint32_t I = 0 ;
1076- for (auto V : getValueSitesForKind (ValueKind)[Site].ValueData ) {
1077- Dest[I].Value = V.Value ;
1078- Dest[I].Count = V.Count ;
1079- I++;
1080- }
1081- }
1082-
10831042void InstrProfRecord::reserveSites (uint32_t ValueKind, uint32_t NumValueSites) {
10841043 if (!NumValueSites)
10851044 return ;
0 commit comments