LLVM  14.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::DenormalMode Struct Reference

Represent subnormal handling kind for floating point instruction inputs and outputs. More...

#include "llvm/ADT/FloatingPointMode.h"

Collaboration diagram for llvm::DenormalMode:
Collaboration graph
[legend]

Public Types

enum  DenormalModeKind : int8_t { Invalid = -1, IEEE, PreserveSign, PositiveZero }
 Represent handled modes for denormal (aka subnormal) modes in the floating point environment. More...
 

Public Member Functions

constexpr DenormalMode ()=default
 
constexpr DenormalMode (DenormalModeKind Out, DenormalModeKind In)
 
bool operator== (DenormalMode Other) const
 
bool operator!= (DenormalMode Other) const
 
bool isSimple () const
 
bool isValid () const
 
void print (raw_ostream &OS) const
 
std::string str () const
 

Static Public Member Functions

static constexpr DenormalMode getInvalid ()
 
static constexpr DenormalMode getIEEE ()
 
static constexpr DenormalMode getPreserveSign ()
 
static constexpr DenormalMode getPositiveZero ()
 

Public Attributes

DenormalModeKind Output = DenormalModeKind::Invalid
 Denormal flushing mode for floating point instruction results in the default floating point environment. More...
 
DenormalModeKind Input = DenormalModeKind::Invalid
 Denormal treatment kind for floating point instruction inputs in the default floating-point environment. More...
 

Detailed Description

Represent subnormal handling kind for floating point instruction inputs and outputs.

Definition at line 67 of file FloatingPointMode.h.

Member Enumeration Documentation

◆ DenormalModeKind

Represent handled modes for denormal (aka subnormal) modes in the floating point environment.

Enumerator
Invalid 
IEEE 

IEEE-754 denormal numbers preserved.

PreserveSign 

The sign of a flushed-to-zero number is preserved in the sign of 0.

PositiveZero 

Denormals are flushed to positive zero.

Definition at line 70 of file FloatingPointMode.h.

Constructor & Destructor Documentation

◆ DenormalMode() [1/2]

constexpr llvm::DenormalMode::DenormalMode ( )
constexprdefault

◆ DenormalMode() [2/2]

constexpr llvm::DenormalMode::DenormalMode ( DenormalModeKind  Out,
DenormalModeKind  In 
)
inlineconstexpr

Definition at line 93 of file FloatingPointMode.h.

Member Function Documentation

◆ getIEEE()

static constexpr DenormalMode llvm::DenormalMode::getIEEE ( )
inlinestaticconstexpr

Definition at line 101 of file FloatingPointMode.h.

References DenormalMode().

Referenced by fpModeMatchesGlobalFPAtomicMode().

◆ getInvalid()

static constexpr DenormalMode llvm::DenormalMode::getInvalid ( )
inlinestaticconstexpr

Definition at line 97 of file FloatingPointMode.h.

References DenormalMode(), and Invalid.

◆ getPositiveZero()

static constexpr DenormalMode llvm::DenormalMode::getPositiveZero ( )
inlinestaticconstexpr

Definition at line 110 of file FloatingPointMode.h.

References DenormalMode(), and llvm::ARMBuildAttrs::PositiveZero.

◆ getPreserveSign()

static constexpr DenormalMode llvm::DenormalMode::getPreserveSign ( )
inlinestaticconstexpr

Definition at line 105 of file FloatingPointMode.h.

References DenormalMode().

Referenced by fpModeMatchesGlobalFPAtomicMode().

◆ isSimple()

bool llvm::DenormalMode::isSimple ( ) const
inline

Definition at line 123 of file FloatingPointMode.h.

References Input, and Output.

◆ isValid()

bool llvm::DenormalMode::isValid ( ) const
inline

Definition at line 127 of file FloatingPointMode.h.

References Input, Invalid, and Output.

◆ operator!=()

bool llvm::DenormalMode::operator!= ( DenormalMode  Other) const
inline

Definition at line 119 of file FloatingPointMode.h.

References Other.

◆ operator==()

bool llvm::DenormalMode::operator== ( DenormalMode  Other) const
inline

Definition at line 115 of file FloatingPointMode.h.

References Input, Other, and Output.

◆ print()

void llvm::DenormalMode::print ( raw_ostream OS) const
inline

Definition at line 189 of file FloatingPointMode.h.

References llvm::denormalModeKindName(), Input, and Output.

Referenced by str().

◆ str()

std::string llvm::DenormalMode::str ( ) const
inline

Definition at line 134 of file FloatingPointMode.h.

References print(), and llvm::raw_string_ostream::str().

Member Data Documentation

◆ Input

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 90 of file FloatingPointMode.h.

Referenced by isSimple(), isValid(), operator==(), print(), and llvm::AMDGPU::SIModeRegisterDefaults::SIModeRegisterDefaults().

◆ Output

DenormalModeKind llvm::DenormalMode::Output = DenormalModeKind::Invalid

Denormal flushing mode for floating point instruction results in the default floating point environment.

Definition at line 85 of file FloatingPointMode.h.

Referenced by isSimple(), isValid(), operator==(), print(), llvm::AMDGPU::SIModeRegisterDefaults::SIModeRegisterDefaults(), and llvm::NVPTXTargetLowering::useF32FTZ().


The documentation for this struct was generated from the following file: