LLVM  6.0.0svn
Public Types | Public Member Functions | Friends | List of all members
llvm::FastMathFlags Class Reference

Convenience struct for specifying and reasoning about fast-math flags. More...

#include "llvm/IR/Operator.h"

Public Types

enum  {
  UnsafeAlgebra = (1 << 0), NoNaNs = (1 << 1), NoInfs = (1 << 2), NoSignedZeros = (1 << 3),
  AllowReciprocal = (1 << 4), AllowContract = (1 << 5)
}
 This is how the bits are used in Value::SubclassOptionalData so they should fit there too. More...
 

Public Member Functions

 FastMathFlags ()=default
 
bool any () const
 Whether any flag is set. More...
 
void clear ()
 Set all the flags to false. More...
 
bool noNaNs () const
 Flag queries. More...
 
bool noInfs () const
 
bool noSignedZeros () const
 
bool allowReciprocal () const
 
bool allowContract () const
 
bool unsafeAlgebra () const
 
void setNoNaNs ()
 Flag setters. More...
 
void setNoInfs ()
 
void setNoSignedZeros ()
 
void setAllowReciprocal ()
 
void setAllowContract (bool B)
 
void setUnsafeAlgebra ()
 
void operator &= (const FastMathFlags &OtherFlags)
 

Friends

class FPMathOperator
 

Detailed Description

Convenience struct for specifying and reasoning about fast-math flags.

Definition at line 160 of file Operator.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

This is how the bits are used in Value::SubclassOptionalData so they should fit there too.

Enumerator
UnsafeAlgebra 
NoNaNs 
NoInfs 
NoSignedZeros 
AllowReciprocal 
AllowContract 

Definition at line 171 of file Operator.h.

Constructor & Destructor Documentation

◆ FastMathFlags()

llvm::FastMathFlags::FastMathFlags ( )
default

Member Function Documentation

◆ allowContract()

bool llvm::FastMathFlags::allowContract ( ) const
inline

Definition at line 193 of file Operator.h.

Referenced by isVectorReductionOp().

◆ allowReciprocal()

bool llvm::FastMathFlags::allowReciprocal ( ) const
inline

Definition at line 192 of file Operator.h.

Referenced by isVectorReductionOp(), and shouldKeepFDivF32().

◆ any()

bool llvm::FastMathFlags::any ( ) const
inline

Whether any flag is set.

Definition at line 183 of file Operator.h.

Referenced by FunctionNumber(), and readWideAPInt().

◆ clear()

void llvm::FastMathFlags::clear ( )
inline

Set all the flags to false.

Definition at line 186 of file Operator.h.

Referenced by llvm::IRBuilderBase::clearFastMathFlags().

◆ noInfs()

bool llvm::FastMathFlags::noInfs ( ) const
inline

Definition at line 190 of file Operator.h.

Referenced by isVectorReductionOp(), and SimplifyFAddInst().

◆ noNaNs()

bool llvm::FastMathFlags::noNaNs ( ) const
inline

◆ noSignedZeros()

bool llvm::FastMathFlags::noSignedZeros ( ) const
inline

◆ operator &=()

void llvm::FastMathFlags::operator&= ( const FastMathFlags OtherFlags)
inline

Definition at line 213 of file Operator.h.

◆ setAllowContract()

void llvm::FastMathFlags::setAllowContract ( bool  B)
inline

Definition at line 201 of file Operator.h.

Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().

◆ setAllowReciprocal()

void llvm::FastMathFlags::setAllowReciprocal ( )
inline

Definition at line 200 of file Operator.h.

Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().

◆ setNoInfs()

void llvm::FastMathFlags::setNoInfs ( )
inline

Definition at line 198 of file Operator.h.

Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().

◆ setNoNaNs()

void llvm::FastMathFlags::setNoNaNs ( )
inline

◆ setNoSignedZeros()

void llvm::FastMathFlags::setNoSignedZeros ( )
inline

Definition at line 199 of file Operator.h.

Referenced by llvm::LLParser::getContext(), getDecodedFastMathFlags(), and getPow().

◆ setUnsafeAlgebra()

void llvm::FastMathFlags::setUnsafeAlgebra ( )
inline

◆ unsafeAlgebra()

bool llvm::FastMathFlags::unsafeAlgebra ( ) const
inline

Definition at line 194 of file Operator.h.

Referenced by addStackMapLiveVars(), isVectorReductionOp(), and shouldKeepFDivF32().

Friends And Related Function Documentation

◆ FPMathOperator

friend class FPMathOperator
friend

Definition at line 162 of file Operator.h.


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