15#ifndef LLVM_ADT_FLOATINGPOINTMODE_H
16#define LLVM_ADT_FLOATINGPOINTMODE_H
60 default:
return "invalid";
151 return !(*
this ==
Other);
208 bool OmitIfSame =
false)
const;
210 inline std::string
str()
const {
238 bool LegacyName =
true) {
243 return LegacyName ?
"preserve-sign" :
"preservesign";
245 return LegacyName ?
"positive-zero" :
"positivezero";
256 std::tie(OutputStr, InputStr) = Str.
split(
',');
272 OS << (Legacy ?
',' :
'|');
281 static constexpr unsigned BitsPerEntry = 2;
282 static constexpr unsigned BitsPerMode = 4;
283 static constexpr unsigned ModeMask = (1 << BitsPerMode) - 1;
295 : FloatMode.
Input) {}
320 return !(*
this ==
Other);
327 F32Mode.mergeCalleeMode(Callee.F32Mode)};
388 bool OrderedZeroSign =
false);
396 bool OrderedZeroSign =
false);
405 bool OrderedZeroSign =
false);
413 bool OrderedZeroSign =
false);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#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< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::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.
std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
constexpr bool empty() const
empty - Check if the string is empty.
A switch()-like statement whose cases are string literals.
StringSwitch & Cases(std::initializer_list< StringLiteral > CaseStrings, 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.
constexpr StringRef denormalModeKindName(DenormalMode::DenormalModeKind Mode, bool LegacyName=true)
Return the name used for the denormal handling mode used by the expected names from the denormal-fp-m...
DenormalMode::DenormalModeKind parseDenormalFPAttributeComponent(StringRef Str)
Parse the expected names from the denormal-fp-math attribute.
LLVM_ABI bool cannotOrderStrictlyGreaterEq(FPClassTest LHS, FPClassTest RHS, bool OrderedZeroSign=false)
Returns true if all values in LHS must be less than those in RHS.
LLVM_ABI bool cannotOrderStrictlyLess(FPClassTest LHS, FPClassTest RHS, bool OrderedZeroSign=false)
Returns true if all values in LHS must be greater than or equal to those in RHS.
LLVM_ABI bool cannotOrderStrictlyLessEq(FPClassTest LHS, FPClassTest RHS, bool OrderedZeroSign=false)
Returns true if all values in LHS must be greater than to those in RHS.
LLVM_ABI bool cannotOrderStrictlyGreater(FPClassTest LHS, FPClassTest RHS, bool OrderedZeroSign=false)
Returns true if all values in LHS must be less than or equal to those in RHS.
LLVM_ABI 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.
LLVM_ABI FPClassTest inverse_fabs(FPClassTest Mask)
Return the test mask which returns true after fabs is applied to the value.
constexpr bool isUInt(uint64_t x)
Checks if an unsigned integer fits into the given bit width.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
LLVM_ABI 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 spell(RoundingMode RM)
Returns text representation of the given rounding mode.
Represents the full denormal controls for a function, including the default mode and the f32 specific...
static constexpr DenormalFPEnv getDefault()
DenormalFPEnv mergeCalleeMode(DenormalFPEnv Callee) const
constexpr bool operator!=(DenormalFPEnv Other) const
static constexpr DenormalFPEnv createFromIntValue(uint32_t Data)
constexpr DenormalFPEnv(DenormalMode BaseMode, DenormalMode FloatMode=DenormalMode::getInvalid())
constexpr bool operator==(DenormalFPEnv Other) const
LLVM_ABI void print(raw_ostream &OS, bool OmitIfSame=true) const
constexpr uint32_t toIntValue() const
Represent subnormal handling kind for floating point instruction inputs and outputs.
constexpr bool inputsMayBePositiveZero() const
Return true if input denormals could be flushed to +0.
constexpr bool operator!=(DenormalMode Other) const
void print(raw_ostream &OS, bool Legacy=true, bool OmitIfSame=false) const
static constexpr DenormalMode createFromIntValue(uint32_t Data)
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.
constexpr bool operator==(DenormalMode Other) const
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 uint32_t toIntValue() const
constexpr DenormalMode(const DenormalMode &)=default
static constexpr DenormalMode getDefault()
Return the assumed default mode for a function without denormal-fp-math.
constexpr bool inputsMayBeZero() const
Return true if input denormals may be implicitly treated as 0.
constexpr DenormalMode mergeCalleeMode(DenormalMode Callee) const
Get the effective denormal mode if the mode if this caller calls into a function with Callee.
constexpr bool outputsMayBePositiveZero() const
Return true if output denormals could be flushed to +0.
constexpr bool outputsMayBeZero() const
Return true if output denormals may be implicitly treated as 0.
static constexpr DenormalMode getInvalid()
constexpr bool isValid() const
constexpr bool inputsAreZero() const
Return true if input denormals must be implicitly treated as 0.
static constexpr DenormalMode getPreserveSign()
constexpr bool isSimple() const
DenormalModeKind Output
Denormal flushing mode for floating point instruction results in the default floating point environme...
DenormalMode & operator=(const DenormalMode &)=default
constexpr DenormalMode(DenormalModeKind Out, DenormalModeKind In)
constexpr DenormalMode()=default
static constexpr DenormalMode getDynamic()
static constexpr DenormalMode getIEEE()