Skip to content

Commit d6b0b7a

Browse files
[ProfileData] Remove getValueProfDataFromInst (#95617)
I've migrated all uses to the new version of getValueProfDataFromInst that returns std::unique_ptr<InstrProfValueData[]>.
1 parent 3c6a109 commit d6b0b7a

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

llvm/include/llvm/ProfileData/InstrProf.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,6 @@ void annotateValueSite(Module &M, Instruction &Inst,
284284
ArrayRef<InstrProfValueData> VDs, uint64_t Sum,
285285
InstrProfValueKind ValueKind, uint32_t MaxMDCount);
286286

287-
/// Extract the value profile data from \p Inst which is annotated with
288-
/// value profile meta data. Return false if there is no value data annotated,
289-
/// otherwise return true.
290-
bool getValueProfDataFromInst(const Instruction &Inst,
291-
InstrProfValueKind ValueKind,
292-
uint32_t MaxNumValueData,
293-
InstrProfValueData ValueData[],
294-
uint32_t &ActualNumValueData, uint64_t &TotalC,
295-
bool GetNoICPValue = false);
296-
297287
/// Extract the value profile data from \p Inst and returns them if \p Inst is
298288
/// annotated with value profile data. Returns nullptr otherwise. It's similar
299289
/// to `getValueProfDataFromInst` above except that an array is allocated only

llvm/lib/ProfileData/InstrProf.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,22 +1381,6 @@ getValueProfDataFromInst(const Instruction &Inst, InstrProfValueKind ValueKind,
13811381
return ValueDataArray;
13821382
}
13831383

1384-
// FIXME: Migrate existing callers to the function above that returns an
1385-
// array.
1386-
bool getValueProfDataFromInst(const Instruction &Inst,
1387-
InstrProfValueKind ValueKind,
1388-
uint32_t MaxNumValueData,
1389-
InstrProfValueData ValueData[],
1390-
uint32_t &ActualNumValueData, uint64_t &TotalC,
1391-
bool GetNoICPValue) {
1392-
MDNode *MD = mayHaveValueProfileOfKind(Inst, ValueKind);
1393-
if (!MD)
1394-
return false;
1395-
return getValueProfDataFromInstImpl(MD, MaxNumValueData, ValueData,
1396-
ActualNumValueData, TotalC,
1397-
GetNoICPValue);
1398-
}
1399-
14001384
MDNode *getPGOFuncNameMetadata(const Function &F) {
14011385
return F.getMetadata(getPGOFuncNameMetadataName());
14021386
}

0 commit comments

Comments
 (0)