LLVM: include/llvm/ADT/FloatingPointMode.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_ADT_FLOATINGPOINTMODE_H
16#define LLVM_ADT_FLOATINGPOINTMODE_H
17
21
22namespace llvm {
23
24
25
26
27
28
29
30
31
32
33
34
35
36
38
44
45
46 Dynamic = 7,
47 Invalid = -1
48};
49
50
52 switch (RM) {
59 default: return "invalid";
60 }
61}
62
65 return OS;
66}
67
68
69
71
72
75
76
78
79
81
82
84
85
88
89
90
92
93
94
95
97
102
104
107 }
108
109
112 }
113
116 }
117
121 }
122
126 }
127
130 }
131
134 }
135
137 return !(*this == Other);
138 }
139
142 }
143
147 }
148
149
153 }
154
155
159 }
160
161
162
163
170 return MergedMode;
171 }
172
174
175 inline std::string str() const {
176 std::string storage;
179 return storage;
180 }
181};
182
185 return OS;
186}
187
188
191
198}
199
200
201
203 switch (Mode) {
205 return "ieee";
207 return "preserve-sign";
209 return "positive-zero";
211 return "dynamic";
212 default:
213 return "";
214 }
215}
216
217
220 std::tie(OutputStr, InputStr) = Str.split(',');
221
224
225
226
229
231}
232
235}
236
237
238
241
252
263
265};
266
268
269
271
272
274
275
276
278
279
281
282}
283
284#endif
#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()