13 #ifndef LLVM_FLOATINGPOINTMODE_H 14 #define LLVM_FLOATINGPOINTMODE_H 56 default:
return "invalid";
102 return DenormalMode(DenormalModeKind::IEEE, DenormalModeKind::IEEE);
107 DenormalModeKind::PreserveSign);
120 return !(*
this ==
Other);
134 inline std::string
str()
const {
165 return "preserve-sign";
167 return "positive-zero";
176 std::tie(OutputStr, InputStr) = Str.
split(
',');
195 #endif // LLVM_FLOATINGPOINTMODE_H
bool operator==(DenormalMode Other) const
This class represents lattice values for constants.
static constexpr DenormalMode getIEEE()
StringRef denormalModeKindName(DenormalMode::DenormalModeKind Mode)
Return the name used for the denormal handling mode used by the the expected names from the denormal-...
constexpr DenormalMode(DenormalModeKind Out, DenormalModeKind In)
DenormalModeKind Output
Denormal flushing mode for floating point instruction results in the default floating point environme...
void print(raw_ostream &OS) const
StringSwitch & Case(StringLiteral S, T Value)
constexpr DenormalMode()=default
LLVM_NODISCARD R Default(T Value)
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
StringRef spell(RoundingMode RM)
Returns text representation of the given rounding mode.
A switch()-like statement whose cases are string literals.
StringSwitch & Cases(StringLiteral S0, StringLiteral S1, T Value)
DenormalMode::DenormalModeKind parseDenormalFPAttributeComponent(StringRef Str)
Parse the expected names from the denormal-fp-math attribute.
DenormalMode parseDenormalFPAttribute(StringRef Str)
Returns the denormal mode to use for inputs and outputs.
IEEE-754 denormal numbers preserved.
std::string & str()
Flushes the stream contents to the target string and returns the string's reference.
static constexpr DenormalMode getPreserveSign()
Represent subnormal handling kind for floating point instruction inputs and outputs.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Denotes mode unknown at compile time.
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
DenormalModeKind
Represent handled modes for denormal (aka subnormal) modes in the floating point environment.
The sign of a flushed-to-zero number is preserved in the sign of 0.
RoundingMode
Rounding mode.
static constexpr DenormalMode getPositiveZero()
static constexpr DenormalMode getInvalid()
DenormalModeKind Input
Denormal treatment kind for floating point instruction inputs in the default floating-point environme...
A raw_ostream that writes to an std::string.
bool operator!=(DenormalMode Other) const
Denormals are flushed to positive zero.
This class implements an extremely fast bulk output stream that can only output to a stream.
StringRef - Represent a constant reference to a string, i.e.