@@ -93,7 +93,7 @@ extern cl::opt<bool> ScalePartialSampleProfileWorkingSetSize;
93
93
// instruction in it takes an address of any basic block, because instruction
94
94
// can only take an address of basic block located in the same function.
95
95
static bool findRefEdges (ModuleSummaryIndex &Index, const User *CurUser,
96
- SetVector<ValueInfo, std::vector<ValueInfo> > &RefEdges,
96
+ SetVector<ValueInfo> &RefEdges,
97
97
SmallPtrSet<const User *, 8 > &Visited) {
98
98
bool HasBlockAddress = false ;
99
99
SmallVector<const User *, 32 > Worklist;
@@ -144,12 +144,9 @@ static bool isNonRenamableLocal(const GlobalValue &GV) {
144
144
145
145
// / Determine whether this call has all constant integer arguments (excluding
146
146
// / "this") and summarize it to VCalls or ConstVCalls as appropriate.
147
- static void addVCallToSet (
148
- DevirtCallSite Call, GlobalValue::GUID Guid,
149
- SetVector<FunctionSummary::VFuncId, std::vector<FunctionSummary::VFuncId>>
150
- &VCalls,
151
- SetVector<FunctionSummary::ConstVCall,
152
- std::vector<FunctionSummary::ConstVCall>> &ConstVCalls) {
147
+ static void addVCallToSet (DevirtCallSite Call, GlobalValue::GUID Guid,
148
+ SetVector<FunctionSummary::VFuncId> &VCalls,
149
+ SetVector<FunctionSummary::ConstVCall> &ConstVCalls) {
153
150
std::vector<uint64_t > Args;
154
151
// Start from the second argument to skip the "this" pointer.
155
152
for (auto &Arg : drop_begin (Call.CB .args ())) {
@@ -166,18 +163,11 @@ static void addVCallToSet(
166
163
// / If this intrinsic call requires that we add information to the function
167
164
// / summary, do so via the non-constant reference arguments.
168
165
static void addIntrinsicToSummary (
169
- const CallInst *CI,
170
- SetVector<GlobalValue::GUID, std::vector<GlobalValue::GUID>> &TypeTests,
171
- SetVector<FunctionSummary::VFuncId, std::vector<FunctionSummary::VFuncId>>
172
- &TypeTestAssumeVCalls,
173
- SetVector<FunctionSummary::VFuncId, std::vector<FunctionSummary::VFuncId>>
174
- &TypeCheckedLoadVCalls,
175
- SetVector<FunctionSummary::ConstVCall,
176
- std::vector<FunctionSummary::ConstVCall>>
177
- &TypeTestAssumeConstVCalls,
178
- SetVector<FunctionSummary::ConstVCall,
179
- std::vector<FunctionSummary::ConstVCall>>
180
- &TypeCheckedLoadConstVCalls,
166
+ const CallInst *CI, SetVector<GlobalValue::GUID> &TypeTests,
167
+ SetVector<FunctionSummary::VFuncId> &TypeTestAssumeVCalls,
168
+ SetVector<FunctionSummary::VFuncId> &TypeCheckedLoadVCalls,
169
+ SetVector<FunctionSummary::ConstVCall> &TypeTestAssumeConstVCalls,
170
+ SetVector<FunctionSummary::ConstVCall> &TypeCheckedLoadConstVCalls,
181
171
DominatorTree &DT) {
182
172
switch (CI->getCalledFunction ()->getIntrinsicID ()) {
183
173
case Intrinsic::type_test:
@@ -279,14 +269,12 @@ static void computeFunctionSummary(
279
269
MapVector<ValueInfo, CalleeInfo, DenseMap<ValueInfo, unsigned >,
280
270
std::vector<std::pair<ValueInfo, CalleeInfo>>>
281
271
CallGraphEdges;
282
- SetVector<ValueInfo, std::vector<ValueInfo>> RefEdges, LoadRefEdges,
283
- StoreRefEdges;
284
- SetVector<GlobalValue::GUID, std::vector<GlobalValue::GUID>> TypeTests;
285
- SetVector<FunctionSummary::VFuncId, std::vector<FunctionSummary::VFuncId>>
286
- TypeTestAssumeVCalls, TypeCheckedLoadVCalls;
287
- SetVector<FunctionSummary::ConstVCall,
288
- std::vector<FunctionSummary::ConstVCall>>
289
- TypeTestAssumeConstVCalls, TypeCheckedLoadConstVCalls;
272
+ SetVector<ValueInfo> RefEdges, LoadRefEdges, StoreRefEdges;
273
+ SetVector<GlobalValue::GUID> TypeTests;
274
+ SetVector<FunctionSummary::VFuncId> TypeTestAssumeVCalls,
275
+ TypeCheckedLoadVCalls;
276
+ SetVector<FunctionSummary::ConstVCall> TypeTestAssumeConstVCalls,
277
+ TypeCheckedLoadConstVCalls;
290
278
ICallPromotionAnalysis ICallAnalysis;
291
279
SmallPtrSet<const User *, 8 > Visited;
292
280
@@ -517,7 +505,7 @@ static void computeFunctionSummary(
517
505
std::vector<ValueInfo> Refs;
518
506
if (IsThinLTO) {
519
507
auto AddRefEdges = [&](const std::vector<const Instruction *> &Instrs,
520
- SetVector<ValueInfo, std::vector<ValueInfo> > &Edges,
508
+ SetVector<ValueInfo> &Edges,
521
509
SmallPtrSet<const User *, 8 > &Cache) {
522
510
for (const auto *I : Instrs) {
523
511
Cache.erase (I);
@@ -722,7 +710,7 @@ static void computeVariableSummary(ModuleSummaryIndex &Index,
722
710
DenseSet<GlobalValue::GUID> &CantBePromoted,
723
711
const Module &M,
724
712
SmallVectorImpl<MDNode *> &Types) {
725
- SetVector<ValueInfo, std::vector<ValueInfo> > RefEdges;
713
+ SetVector<ValueInfo> RefEdges;
726
714
SmallPtrSet<const User *, 8 > Visited;
727
715
bool HasBlockAddress = findRefEdges (Index, &V, RefEdges, Visited);
728
716
bool NonRenamableLocal = isNonRenamableLocal (V);
0 commit comments