[llvm] 3a34228 - [StackSafety] Don't keep FullSet in index
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 15:10:35 PDT 2020
Author: Vitaly Buka
Date: 2020-08-09T15:01:46-07:00
New Revision: 3a34228bff6fdf45b50cb57cf5fb85d659eeb672
URL: https://github.com/llvm/llvm-project/commit/3a34228bff6fdf45b50cb57cf5fb85d659eeb672
DIFF: https://github.com/llvm/llvm-project/commit/3a34228bff6fdf45b50cb57cf5fb85d659eeb672.diff
LOG: [StackSafety] Don't keep FullSet in index
Optimization. Missing record is enterpreted as FullSet anyway.
Added:
Modified:
llvm/lib/Analysis/StackSafetyAnalysis.cpp
llvm/test/Analysis/StackSafetyAnalysis/ipa.ll
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index c5a331205ec7..49914e61fb1f 100644
--- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -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;
diff --git a/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll b/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll
index 6f0feafb8d74..8cb875b8a9aa 100644
--- a/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll
+++ b/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll
@@ -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:
More information about the llvm-commits
mailing list