LLVM 20.0.0git
|
Represent subnormal handling kind for floating point instruction inputs and outputs. More...
#include "llvm/ADT/FloatingPointMode.h"
Public Types | |
enum | DenormalModeKind : int8_t { Invalid = -1 , IEEE , PreserveSign , PositiveZero , Dynamic } |
Represent handled modes for denormal (aka subnormal) modes in the floating point environment. More... | |
Public Member Functions | |
constexpr | DenormalMode ()=default |
constexpr | DenormalMode (const DenormalMode &)=default |
constexpr | DenormalMode (DenormalModeKind Out, DenormalModeKind In) |
DenormalMode & | operator= (const DenormalMode &)=default |
bool | operator== (DenormalMode Other) const |
bool | operator!= (DenormalMode Other) const |
bool | isSimple () const |
bool | isValid () const |
constexpr bool | inputsAreZero () const |
Return true if input denormals must be implicitly treated as 0. | |
constexpr bool | outputsAreZero () const |
Return true if output denormals should be flushed to 0. | |
DenormalMode | mergeCalleeMode (DenormalMode Callee) const |
Get the effective denormal mode if the mode if this caller calls into a function with Callee . | |
void | print (raw_ostream &OS) const |
std::string | str () const |
Static Public Member Functions | |
static constexpr DenormalMode | getInvalid () |
static constexpr DenormalMode | getDefault () |
Return the assumed default mode for a function without denormal-fp-math. | |
static constexpr DenormalMode | getIEEE () |
static constexpr DenormalMode | getPreserveSign () |
static constexpr DenormalMode | getPositiveZero () |
static constexpr DenormalMode | getDynamic () |
Public Attributes | |
DenormalModeKind | Output = DenormalModeKind::Invalid |
Denormal flushing mode for floating point instruction results in the default floating point environment. | |
DenormalModeKind | Input = DenormalModeKind::Invalid |
Denormal treatment kind for floating point instruction inputs in the default floating-point environment. | |
Represent subnormal handling kind for floating point instruction inputs and outputs.
Definition at line 70 of file FloatingPointMode.h.
enum llvm::DenormalMode::DenormalModeKind : int8_t |
Represent handled modes for denormal (aka subnormal) modes in the floating point environment.
Definition at line 73 of file FloatingPointMode.h.
|
constexprdefault |
Referenced by getDynamic(), getIEEE(), getInvalid(), getPositiveZero(), and getPreserveSign().
|
constexprdefault |
|
inlineconstexpr |
Definition at line 100 of file FloatingPointMode.h.
|
inlinestaticconstexpr |
Return the assumed default mode for a function without denormal-fp-math.
Definition at line 110 of file FloatingPointMode.h.
References getIEEE().
|
inlinestaticconstexpr |
Definition at line 128 of file FloatingPointMode.h.
References DenormalMode(), and Dynamic.
Referenced by denormModeCompatible().
|
inlinestaticconstexpr |
Definition at line 114 of file FloatingPointMode.h.
References DenormalMode(), and IEEE.
Referenced by computeKnownFPClass(), foldFCmpFSubIntoFCmp(), getDefault(), llvm::SITargetLowering::isCanonicalized(), llvm::AMDGPULegalizerInfo::legalizeFDIV32(), and llvm::KnownFPClass::propagateDenormal().
|
inlinestaticconstexpr |
Definition at line 105 of file FloatingPointMode.h.
References DenormalMode(), and Invalid.
Referenced by checkDenormMode(), and llvm::Function::getDenormalModeF32Raw().
|
inlinestaticconstexpr |
Definition at line 123 of file FloatingPointMode.h.
References DenormalMode(), and PositiveZero.
Referenced by llvm::KnownFPClass::propagateDenormal().
|
inlinestaticconstexpr |
Definition at line 118 of file FloatingPointMode.h.
References DenormalMode(), and PreserveSign.
Referenced by atomicIgnoresDenormalModeOrFPModeIsFTZ(), denormalModeIsFlushAllF32(), denormalModeIsFlushAllF64F16(), llvm::SIModeRegisterDefaults::fpDenormModeDPValue(), llvm::SIModeRegisterDefaults::fpDenormModeSPValue(), llvm::GCNTTIImpl::GCNTTIImpl(), llvm::AMDGPULegalizerInfo::legalizeFMad(), llvm::AMDGPUTargetLowering::LowerDIVREM24(), llvm::AMDGPUTargetLowering::LowerUDIVREM64(), and llvm::AMDGPUCodeGenPreparePass::run().
|
inlineconstexpr |
Return true if input denormals must be implicitly treated as 0.
Definition at line 150 of file FloatingPointMode.h.
References Input, PositiveZero, and PreserveSign.
Referenced by computeKnownFPClass(), and isFCmpEqualZero().
|
inline |
Definition at line 140 of file FloatingPointMode.h.
|
inline |
Definition at line 144 of file FloatingPointMode.h.
References Input, Invalid, and Output.
Referenced by llvm::DenormalFPMathState::DenormalState::isValid().
|
inline |
Get the effective denormal mode if the mode if this caller calls into a function with Callee
.
This promotes dynamic modes to the mode of the caller.
Definition at line 164 of file FloatingPointMode.h.
|
inline |
Definition at line 136 of file FloatingPointMode.h.
References llvm::Other.
|
default |
|
inline |
Definition at line 132 of file FloatingPointMode.h.
References Input, llvm::Other, and Output.
|
inlineconstexpr |
Return true if output denormals should be flushed to 0.
Definition at line 156 of file FloatingPointMode.h.
References Output, PositiveZero, and PreserveSign.
Referenced by computeKnownFPClass().
|
inline |
Definition at line 233 of file FloatingPointMode.h.
References llvm::denormalModeKindName(), Input, OS, and Output.
Referenced by str().
|
inline |
Definition at line 175 of file FloatingPointMode.h.
DenormalModeKind llvm::DenormalMode::Input = DenormalModeKind::Invalid |
Denormal treatment kind for floating point instruction inputs in the default floating-point environment.
If this is not DenormalModeKind::IEEE, floating-point instructions implicitly treat the input value as 0.
Definition at line 96 of file FloatingPointMode.h.
Referenced by computeKnownFPClass(), denormModeCompatible(), llvm::FlushFPConstant(), llvm::SIModeRegisterDefaults::fpDenormModeDPValue(), llvm::SIModeRegisterDefaults::fpDenormModeSPValue(), inputsAreZero(), isFCmpEqualZero(), llvm::DenormalFPMathState::isModeFixed(), isSimple(), isValid(), mergeCalleeMode(), needsDenormHandlingF32(), llvm::AMDGPUTargetLowering::needsDenormHandlingF32(), operator==(), llvm::GCNTargetMachine::parseMachineFunctionInfo(), and print().
DenormalModeKind llvm::DenormalMode::Output = DenormalModeKind::Invalid |
Denormal flushing mode for floating point instruction results in the default floating point environment.
Definition at line 91 of file FloatingPointMode.h.
Referenced by computeKnownFPClass(), denormModeCompatible(), llvm::FlushFPConstant(), llvm::SIModeRegisterDefaults::fpDenormModeDPValue(), llvm::SIModeRegisterDefaults::fpDenormModeSPValue(), llvm::DenormalFPMathState::isModeFixed(), isSimple(), isValid(), mergeCalleeMode(), operator==(), outputsAreZero(), llvm::GCNTargetMachine::parseMachineFunctionInfo(), print(), and llvm::NVPTXTargetLowering::useF32FTZ().