[llvm] 654266b - [StackSafety] Use getSignedMin() to serialize ranges
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 15:10:33 PDT 2020
Author: Vitaly Buka
Date: 2020-08-09T14:53:13-07:00
New Revision: 654266bea9ba1fdd0a8e13029b48ac7043bd7cb4
URL: https://github.com/llvm/llvm-project/commit/654266bea9ba1fdd0a8e13029b48ac7043bd7cb4
DIFF: https://github.com/llvm/llvm-project/commit/654266bea9ba1fdd0a8e13029b48ac7043bd7cb4.diff
LOG: [StackSafety] Use getSignedMin() to serialize ranges
Almost NFC as it's important only for full sets which should not
be serialized at all.
Added:
Modified:
llvm/lib/IR/AsmWriter.cpp
llvm/test/Analysis/StackSafetyAnalysis/ipa.ll
Removed:
################################################################################
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 66098026b986..5073ee9eb3d2 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -3089,7 +3089,7 @@ void AssemblyWriter::printFunctionSummary(const FunctionSummary *FS) {
printTypeIdInfo(*TIdInfo);
auto PrintRange = [&](const ConstantRange &Range) {
- Out << "[" << Range.getLower() << ", " << Range.getSignedMax() << "]";
+ Out << "[" << Range.getSignedMin() << ", " << Range.getSignedMax() << "]";
};
if (!FS->paramAccesses().empty()) {
diff --git a/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll b/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll
index 877fb5e995b0..6f0feafb8d74 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: [-1, 9223372036854775807])))))
+; INDEX-DAG: guid: [[RecursiveWithOffset]], {{.*}}, params: ((param: 1, offset: [-9223372036854775808, 9223372036854775807])))))
; 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: [-1, 9223372036854775807]), (param: 2, offset: [0, 3])))))
-; INDEX-DAG: guid: [[Write1Weak]], {{.*}}, params: ((param: 0, offset: [-1, 9223372036854775807])))))
+; 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: [[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: [-1, 9223372036854775807])))))
+; INDEX-DAG: guid: [[Write1DiffModule]], {{.*}}, params: ((param: 0, offset: [-9223372036854775808, 9223372036854775807])))))
; INDEX-DAG: guid: [[ReturnAlloca]], {{.*}}, insts: 2)))
; INDEX-LABEL: blockcount:
More information about the llvm-commits
mailing list