@@ -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
147148public:
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.
161162std::vector<IndirectCallPromoter::PromotionCandidate>
162163IndirectCallPromoter::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.
279280bool 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