Skip to content

Commit 72b841d

Browse files
[Analysis] Migrate to a new version of getValueProfDataFromInst (#95561)
Note that the version of getValueProfDataFromInst that returns bool has been "deprecated" since: commit 1e15371 Author: Mingming Liu <mingmingl@google.com> Date: Mon Apr 1 15:14:49 2024 -0700
1 parent 9a92f2f commit 72b841d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ ArrayRef<InstrProfValueData>
9191
ICallPromotionAnalysis::getPromotionCandidatesForInstruction(
9292
const Instruction *I, uint32_t &NumVals, uint64_t &TotalCount,
9393
uint32_t &NumCandidates) {
94-
bool Res =
95-
getValueProfDataFromInst(*I, IPVK_IndirectCallTarget, MaxNumPromotions,
96-
ValueDataArray.get(), NumVals, TotalCount);
94+
auto Res = getValueProfDataFromInst(*I, IPVK_IndirectCallTarget,
95+
MaxNumPromotions, NumVals, TotalCount);
9796
if (!Res) {
9897
NumCandidates = 0;
9998
return ArrayRef<InstrProfValueData>();
10099
}
100+
ValueDataArray = std::move(Res);
101101
NumCandidates = getProfitablePromotionCandidates(I, NumVals, TotalCount);
102102
return ArrayRef<InstrProfValueData>(ValueDataArray.get(), NumVals);
103103
}

0 commit comments

Comments
 (0)