diff options
author | Andreas Jonson <andjo403@hotmail.com> | 2024-04-26 04:04:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-26 11:04:47 +0900 |
commit | 93de97d750548cd90c53efd4367dbd0367aa30fd (patch) | |
tree | 9545bcea0653de4290551ddd5e2a636bc8e60a4e /llvm/lib/IR/Function.cpp | |
parent | a8c88de0dff865d1969b654bb5c0df181aa2df6a (diff) | |
download | llvm-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.cpp | 4 |
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(); |