[StackSafety] Don't keep FullSet in index

Optimization. Missing record is enterpreted as FullSet anyway.
This commit is contained in:
Vitaly Buka 2020-08-07 17:25:50 -07:00
parent 654266bea9
commit 3a34228bff
2 changed files with 7 additions and 4 deletions

View File

@ -996,6 +996,9 @@ void llvm::generateParamAccessSummary(ModuleSummaryIndex &Index) {
std::vector<FunctionSummary::ParamAccess> NewParams;
NewParams.reserve(KV.second.Params.size());
for (auto &Param : KV.second.Params) {
// It's not needed as FullSet is processed the same as a missing value.
if (Param.second.Range.isFullSet())
continue;
NewParams.emplace_back();
FunctionSummary::ParamAccess &New = NewParams.back();
New.ParamNo = Param.first;

View File

@ -706,17 +706,17 @@ entry:
; INDEX-DAG: guid: [[Write1SameModule]], {{.*}}, params: ((param: 0, offset: [0, 0])))))
; INDEX-DAG: guid: [[Write8]], {{.*}}, params: ((param: 0, offset: [0, 7])))))
; INDEX-DAG: guid: [[Write4_2]], {{.*}}, params: ((param: 0, offset: [0, 3]), (param: 1, offset: [0, 3])))))
; INDEX-DAG: guid: [[RecursiveWithOffset]], {{.*}}, params: ((param: 1, offset: [-9223372036854775808, 9223372036854775807])))))
; INDEX-DAG: guid: [[RecursiveWithOffset]], {{.*}}, calls: ((callee: ^{{[0-9]+}})))))
; INDEX-DAG: guid: [[Weak]], {{.*}}, funcFlags: ({{.*}}))))
; INDEX-DAG: guid: [[Write1Private]], {{.*}}, params: ((param: 0, offset: [-1, -1])))))
; INDEX-DAG: guid: [[InterposableWrite1]], {{.*}}, params: ((param: 0, offset: [0, 0])))))
; INDEX-DAG: guid: [[Private]], {{.*}}, params: ((param: 0, offset: [-1, -1])))))
; INDEX-DAG: guid: [[Rec1]], {{.*}}, params: ((param: 0, offset: [3, 6])))))
; INDEX-DAG: guid: [[RecursiveNoOffset]], {{.*}}, params: ((param: 0, offset: [-9223372036854775808, 9223372036854775807]), (param: 2, offset: [0, 3])))))
; INDEX-DAG: guid: [[Write1Weak]], {{.*}}, params: ((param: 0, offset: [-9223372036854775808, 9223372036854775807])))))
; INDEX-DAG: guid: [[RecursiveNoOffset]], {{.*}}, params: ((param: 2, offset: [0, 3])))))
; INDEX-DAG: guid: [[Write1Weak]], {{.*}}, calls: ((callee: ^{{[0-9]+}})))))
; INDEX-DAG: guid: [[Write1]], {{.*}}, params: ((param: 0, offset: [0, 0])))))
; INDEX-DAG: guid: [[PreemptableWrite1]], {{.*}}, funcFlags: ({{.*}}))))
; INDEX-DAG: guid: [[WriteAndReturn8]], {{.*}}, funcFlags: ({{.*}}))))
; INDEX-DAG: guid: [[Write1DiffModule]], {{.*}}, params: ((param: 0, offset: [-9223372036854775808, 9223372036854775807])))))
; INDEX-DAG: guid: [[Write1DiffModule]], {{.*}}, funcFlags: ({{.*}}))))
; INDEX-DAG: guid: [[ReturnAlloca]], {{.*}}, insts: 2)))
; INDEX-LABEL: blockcount: