aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorAndreas Jonson <andjo403@hotmail.com>2024-04-26 04:04:47 +0200
committerGitHub <noreply@github.com>2024-04-26 11:04:47 +0900
commit93de97d750548cd90c53efd4367dbd0367aa30fd (patch)
tree9545bcea0653de4290551ddd5e2a636bc8e60a4e /llvm/lib/IR/Function.cpp
parenta8c88de0dff865d1969b654bb5c0df181aa2df6a (diff)
downloadllvm-93de97d750548cd90c53efd4367dbd0367aa30fd.zip
llvm-93de97d750548cd90c53efd4367dbd0367aa30fd.tar.gz
llvm-93de97d750548cd90c53efd4367dbd0367aa30fd.tar.bz2
[SCCP] Swap out range metadata to range attribute (#90134)
Also moved the range from the function's call sites to the functions return value as that is possible now.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index e66fe73..545940d 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -735,6 +735,10 @@ void Function::addDereferenceableOrNullParamAttr(unsigned ArgNo,
ArgNo, Bytes);
}
+void Function::addRangeRetAttr(const ConstantRange &CR) {
+ AttributeSets = AttributeSets.addRangeRetAttr(getContext(), CR);
+}
+
DenormalMode Function::getDenormalMode(const fltSemantics &FPType) const {
if (&FPType == &APFloat::IEEEsingle()) {
DenormalMode Mode = getDenormalModeF32Raw();