@@ -133,16 +133,17 @@ class IndirectCallPromoter {
133
133
// TotalCount is the total profiled count of call executions, and
134
134
// NumCandidates is the number of candidate entries in ValueDataRef.
135
135
std::vector<PromotionCandidate> getPromotionCandidatesForCallSite (
136
- const CallBase &CB, const ArrayRef<InstrProfValueData> & ValueDataRef,
136
+ const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef,
137
137
uint64_t TotalCount, uint32_t NumCandidates);
138
138
139
139
// Promote a list of targets for one indirect-call callsite by comparing
140
140
// indirect callee with functions. Returns true if there are IR
141
141
// 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);
146
147
147
148
public:
148
149
IndirectCallPromoter (Function &Func, InstrProfSymtab *Symtab, bool SamplePGO,
@@ -160,7 +161,7 @@ class IndirectCallPromoter {
160
161
// the count. Stop at the first target that is not promoted.
161
162
std::vector<IndirectCallPromoter::PromotionCandidate>
162
163
IndirectCallPromoter::getPromotionCandidatesForCallSite (
163
- const CallBase &CB, const ArrayRef<InstrProfValueData> & ValueDataRef,
164
+ const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef,
164
165
uint64_t TotalCount, uint32_t NumCandidates) {
165
166
std::vector<PromotionCandidate> Ret;
166
167
@@ -277,9 +278,8 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB, Function *DirectCallee,
277
278
278
279
// Promote indirect-call to conditional direct-call for one callsite.
279
280
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) {
283
283
uint32_t NumPromoted = 0 ;
284
284
285
285
for (const auto &C : Candidates) {
0 commit comments