Skip to content

Commit c44e9ff

Browse files
[IndirectCallPromotion] Use ArrayRef consistently (NFC) (#96412)
1 parent 259ce11 commit c44e9ff

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,17 @@ class IndirectCallPromoter {
133133
// TotalCount is the total profiled count of call executions, and
134134
// NumCandidates is the number of candidate entries in ValueDataRef.
135135
std::vector<PromotionCandidate> getPromotionCandidatesForCallSite(
136-
const CallBase &CB, const ArrayRef<InstrProfValueData> &ValueDataRef,
136+
const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef,
137137
uint64_t TotalCount, uint32_t NumCandidates);
138138

139139
// Promote a list of targets for one indirect-call callsite by comparing
140140
// indirect callee with functions. Returns true if there are IR
141141
// transformations and false otherwise.
142-
bool tryToPromoteWithFuncCmp(
143-
CallBase &CB, const std::vector<PromotionCandidate> &Candidates,
144-
uint64_t TotalCount, ArrayRef<InstrProfValueData> ICallProfDataRef,
145-
uint32_t NumCandidates);
142+
bool tryToPromoteWithFuncCmp(CallBase &CB,
143+
ArrayRef<PromotionCandidate> Candidates,
144+
uint64_t TotalCount,
145+
ArrayRef<InstrProfValueData> ICallProfDataRef,
146+
uint32_t NumCandidates);
146147

147148
public:
148149
IndirectCallPromoter(Function &Func, InstrProfSymtab *Symtab, bool SamplePGO,
@@ -160,7 +161,7 @@ class IndirectCallPromoter {
160161
// the count. Stop at the first target that is not promoted.
161162
std::vector<IndirectCallPromoter::PromotionCandidate>
162163
IndirectCallPromoter::getPromotionCandidatesForCallSite(
163-
const CallBase &CB, const ArrayRef<InstrProfValueData> &ValueDataRef,
164+
const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef,
164165
uint64_t TotalCount, uint32_t NumCandidates) {
165166
std::vector<PromotionCandidate> Ret;
166167

@@ -277,9 +278,8 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB, Function *DirectCallee,
277278

278279
// Promote indirect-call to conditional direct-call for one callsite.
279280
bool IndirectCallPromoter::tryToPromoteWithFuncCmp(
280-
CallBase &CB, const std::vector<PromotionCandidate> &Candidates,
281-
uint64_t TotalCount, ArrayRef<InstrProfValueData> ICallProfDataRef,
282-
uint32_t NumCandidates) {
281+
CallBase &CB, ArrayRef<PromotionCandidate> Candidates, uint64_t TotalCount,
282+
ArrayRef<InstrProfValueData> ICallProfDataRef, uint32_t NumCandidates) {
283283
uint32_t NumPromoted = 0;
284284

285285
for (const auto &C : Candidates) {

0 commit comments

Comments
 (0)