@@ -857,20 +857,6 @@ struct InstrProfRecord {
857
857
inline ArrayRef<InstrProfValueData> getValueArrayForSite (uint32_t ValueKind,
858
858
uint32_t Site) const ;
859
859
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
-
874
860
// / Reserve space for NumValueSites sites.
875
861
inline void reserveSites (uint32_t ValueKind, uint32_t NumValueSites);
876
862
@@ -1048,38 +1034,11 @@ uint32_t InstrProfRecord::getNumValueSites(uint32_t ValueKind) const {
1048
1034
return getValueSitesForKind (ValueKind).size ();
1049
1035
}
1050
1036
1051
- uint32_t InstrProfRecord::getNumValueDataForSite (uint32_t ValueKind,
1052
- uint32_t Site) const {
1053
- return getValueSitesForKind (ValueKind)[Site].ValueData .size ();
1054
- }
1055
-
1056
1037
ArrayRef<InstrProfValueData>
1057
1038
InstrProfRecord::getValueArrayForSite (uint32_t ValueKind, uint32_t Site) const {
1058
1039
return getValueSitesForKind (ValueKind)[Site].ValueData ;
1059
1040
}
1060
1041
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
-
1083
1042
void InstrProfRecord::reserveSites (uint32_t ValueKind, uint32_t NumValueSites) {
1084
1043
if (!NumValueSites)
1085
1044
return ;
0 commit comments