LLVM 17.0.0git
|
Convenience struct for specifying and reasoning about fast-math flags. More...
#include "llvm/IR/FMF.h"
Public Types | |
enum | { AllowReassoc = (1 << 0) , NoNaNs = (1 << 1) , NoInfs = (1 << 2) , NoSignedZeros = (1 << 3) , AllowReciprocal = (1 << 4) , AllowContract = (1 << 5) , ApproxFunc = (1 << 6) } |
Public Member Functions | |
FastMathFlags ()=default | |
bool | any () const |
bool | none () const |
bool | all () const |
void | clear () |
void | set () |
bool | allowReassoc () const |
Flag queries. | |
bool | noNaNs () const |
bool | noInfs () const |
bool | noSignedZeros () const |
bool | allowReciprocal () const |
bool | allowContract () const |
bool | approxFunc () const |
bool | isFast () const |
'Fast' means all bits are set. | |
void | setAllowReassoc (bool B=true) |
Flag setters. | |
void | setNoNaNs (bool B=true) |
void | setNoInfs (bool B=true) |
void | setNoSignedZeros (bool B=true) |
void | setAllowReciprocal (bool B=true) |
void | setAllowContract (bool B=true) |
void | setApproxFunc (bool B=true) |
void | setFast (bool B=true) |
void | operator&= (const FastMathFlags &OtherFlags) |
void | operator|= (const FastMathFlags &OtherFlags) |
bool | operator!= (const FastMathFlags &OtherFlags) const |
void | print (raw_ostream &O) const |
Print fast-math flags to O . | |
Static Public Member Functions | |
static FastMathFlags | getFast () |
Friends | |
class | FPMathOperator |
Convenience struct for specifying and reasoning about fast-math flags.
anonymous enum |
|
default |
|
inline |
|
inline |
Definition at line 70 of file FMF.h.
References AllowContract, and Flags.
Referenced by instCombineSVEVectorFuseMulAddSub(), print(), and llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags().
|
inline |
Flag queries.
Definition at line 65 of file FMF.h.
References AllowReassoc, and Flags.
Referenced by getISDForVPIntrinsic(), print(), simplifyFAddInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFSubInst(), and llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags().
|
inline |
Definition at line 69 of file FMF.h.
References AllowReciprocal, and Flags.
Referenced by print(), and llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags().
|
inline |
|
inline |
Definition at line 71 of file FMF.h.
References ApproxFunc, and Flags.
Referenced by print(), and llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags().
|
inline |
Definition at line 61 of file FMF.h.
References Flags.
Referenced by llvm::IRBuilderBase::clearFastMathFlags(), and setFast().
|
inlinestatic |
Definition at line 51 of file FMF.h.
References setFast().
Referenced by llvm::RecurrenceDescriptor::AddReductionVar().
|
inline |
|
inline |
Definition at line 67 of file FMF.h.
Referenced by foldFNegIntoConstant(), print(), simplifyFDivInst(), simplifyFPOp(), and llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags().
|
inline |
Definition at line 66 of file FMF.h.
Referenced by llvm::canIgnoreSNaN(), llvm::RecurrenceDescriptor::getRecurrenceIdentity(), isKnownNonNaN(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), print(), simplifyFAddInst(), simplifyFCmpInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFPOp(), simplifyFRemInst(), simplifyFSubInst(), and llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags().
|
inline |
Definition at line 58 of file FMF.h.
References Flags.
Referenced by llvm::InstModificationIRStrategy::mutate().
|
inline |
Definition at line 68 of file FMF.h.
References Flags, and NoSignedZeros.
Referenced by foldFNegIntoConstant(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::RecurrenceDescriptor::getRecurrenceIdentity(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), matchSelectPattern(), print(), simplifyFAddInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFSubInst(), llvm::InstCombinerImpl::visitCallInst(), and llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags().
|
inline |
|
inline |
|
inline |
void llvm::FastMathFlags::print | ( | raw_ostream & | O | ) | const |
Print fast-math flags to O
.
Definition at line 235 of file Operator.cpp.
References all(), allowContract(), allowReassoc(), allowReciprocal(), approxFunc(), noInfs(), noNaNs(), and noSignedZeros().
Referenced by llvm::operator<<(), and llvm::VPRecipeWithIRFlags::printFlags().
|
inline |
Definition at line 91 of file FMF.h.
References AllowContract, B, and Flags.
Referenced by getDecodedFastMathFlags(), and llvm::VPRecipeWithIRFlags::getFastMathFlags().
Flag setters.
Definition at line 76 of file FMF.h.
References AllowReassoc, B, and Flags.
Referenced by getDecodedFastMathFlags(), and llvm::VPRecipeWithIRFlags::getFastMathFlags().
Definition at line 88 of file FMF.h.
References AllowReciprocal, B, and Flags.
Referenced by getDecodedFastMathFlags(), and llvm::VPRecipeWithIRFlags::getFastMathFlags().
Definition at line 94 of file FMF.h.
References ApproxFunc, B, and Flags.
Referenced by getDecodedFastMathFlags(), and llvm::VPRecipeWithIRFlags::getFastMathFlags().
Definition at line 82 of file FMF.h.
References B, Flags, and NoInfs.
Referenced by getDecodedFastMathFlags(), and llvm::VPRecipeWithIRFlags::getFastMathFlags().
Definition at line 79 of file FMF.h.
References B, Flags, and NoNaNs.
Referenced by getDecodedFastMathFlags(), llvm::VPRecipeWithIRFlags::getFastMathFlags(), and llvm::RecurrenceDescriptor::isReductionPHI().
Definition at line 85 of file FMF.h.
References B, Flags, and NoSignedZeros.
Referenced by getDecodedFastMathFlags(), llvm::VPRecipeWithIRFlags::getFastMathFlags(), llvm::RecurrenceDescriptor::isReductionPHI(), and llvm::matchDecomposedSelectPattern().
|
friend |