15#ifndef LLVM_ADT_FLOATINGPOINTMODE_H
16#define LLVM_ADT_FLOATINGPOINTMODE_H
59 default:
return "invalid";
137 return !(*
this ==
Other);
175 inline std::string
str()
const {
207 return "preserve-sign";
209 return "positive-zero";
220 std::tie(OutputStr, InputStr) = Str.split(
',');
#define LLVM_DECLARE_ENUM_AS_BITMASK(Enum, LargestValue)
LLVM_DECLARE_ENUM_AS_BITMASK can be used to declare an enum type as a bit set, so that bitwise operat...
static cl::opt< RegAllocEvictionAdvisorAnalysis::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Development, "development", "for training")))
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
StringSwitch & Cases(StringLiteral S0, StringLiteral S1, T Value)
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an std::string.
This is an optimization pass for GlobalISel generic memory operations.
DenormalMode::DenormalModeKind parseDenormalFPAttributeComponent(StringRef Str)
Parse the expected names from the denormal-fp-math attribute.
FPClassTest fneg(FPClassTest Mask)
Return the test mask which returns true if the value's sign bit is flipped.
FPClassTest
Floating-point class tests, supported by 'is_fpclass' intrinsic.
FPClassTest inverse_fabs(FPClassTest Mask)
Return the test mask which returns true after fabs is applied to the value.
FPClassTest unknown_sign(FPClassTest Mask)
Return the test mask which returns true if the value could have the same set of classes,...
RoundingMode
Rounding mode.
@ TowardZero
roundTowardZero.
@ NearestTiesToEven
roundTiesToEven.
@ Dynamic
Denotes mode unknown at compile time.
@ TowardPositive
roundTowardPositive.
@ NearestTiesToAway
roundTiesToAway.
@ TowardNegative
roundTowardNegative.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
DenormalMode parseDenormalFPAttribute(StringRef Str)
Returns the denormal mode to use for inputs and outputs.
StringRef denormalModeKindName(DenormalMode::DenormalModeKind Mode)
Return the name used for the denormal handling mode used by the expected names from the denormal-fp-m...
StringRef spell(RoundingMode RM)
Returns text representation of the given rounding mode.
Represent subnormal handling kind for floating point instruction inputs and outputs.
DenormalModeKind Input
Denormal treatment kind for floating point instruction inputs in the default floating-point environme...
constexpr bool outputsAreZero() const
Return true if output denormals should be flushed to 0.
DenormalModeKind
Represent handled modes for denormal (aka subnormal) modes in the floating point environment.
@ PreserveSign
The sign of a flushed-to-zero number is preserved in the sign of 0.
@ PositiveZero
Denormals are flushed to positive zero.
@ Dynamic
Denormals have unknown treatment.
@ IEEE
IEEE-754 denormal numbers preserved.
static constexpr DenormalMode getPositiveZero()
constexpr DenormalMode(const DenormalMode &)=default
void print(raw_ostream &OS) const
bool operator!=(DenormalMode Other) const
static constexpr DenormalMode getDefault()
Return the assumed default mode for a function without denormal-fp-math.
static constexpr DenormalMode getInvalid()
constexpr bool inputsAreZero() const
Return true if input denormals must be implicitly treated as 0.
static constexpr DenormalMode getPreserveSign()
DenormalModeKind Output
Denormal flushing mode for floating point instruction results in the default floating point environme...
bool operator==(DenormalMode Other) const
DenormalMode & operator=(const DenormalMode &)=default
constexpr DenormalMode(DenormalModeKind Out, DenormalModeKind In)
constexpr DenormalMode()=default
DenormalMode mergeCalleeMode(DenormalMode Callee) const
Get the effective denormal mode if the mode if this caller calls into a function with Callee.
static constexpr DenormalMode getDynamic()
static constexpr DenormalMode getIEEE()