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 |
Definition at line 60 of file FMF.h.
Referenced by isFast(), llvm::InstModificationIRStrategy::mutate(), and print().
|
inline |
Definition at line 71 of file FMF.h.
References AllowContract.
Referenced by instCombineSVEVectorFuseMulAddSub(), and print().
|
inline |
Flag queries.
Definition at line 66 of file FMF.h.
References AllowReassoc.
Referenced by getISDForVPIntrinsic(), print(), simplifyFAddInst(), simplifyFDivInst(), simplifyFMAFMul(), and simplifyFSubInst().
|
inline |
|
inline |
|
inline |
Definition at line 62 of file FMF.h.
Referenced by llvm::IRBuilderBase::clearFastMathFlags(), and setFast().
|
inlinestatic |
Definition at line 52 of file FMF.h.
References setFast().
Referenced by llvm::RecurrenceDescriptor::AddReductionVar().
|
inline |
|
inline |
Definition at line 68 of file FMF.h.
References NoInfs.
Referenced by foldFNegIntoConstant(), print(), simplifyFDivInst(), and simplifyFPOp().
|
inline |
Definition at line 67 of file FMF.h.
References NoNaNs.
Referenced by llvm::canIgnoreSNaN(), llvm::RecurrenceDescriptor::getRecurrenceIdentity(), isKnownNonNaN(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), print(), simplifyFAddInst(), simplifyFCmpInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFPOp(), simplifyFRemInst(), and simplifyFSubInst().
|
inline |
Definition at line 59 of file FMF.h.
Referenced by llvm::InstModificationIRStrategy::mutate().
|
inline |
Definition at line 69 of file FMF.h.
References NoSignedZeros.
Referenced by foldFNegIntoConstant(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::RecurrenceDescriptor::getRecurrenceIdentity(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), matchSelectPattern(), print(), simplifyFAddInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFSubInst(), and llvm::InstCombinerImpl::visitCallInst().
|
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<<().
|
inline |
Definition at line 92 of file FMF.h.
References AllowContract, and B.
Referenced by getDecodedFastMathFlags().
Flag setters.
Definition at line 77 of file FMF.h.
References AllowReassoc, and B.
Referenced by getDecodedFastMathFlags().
Definition at line 89 of file FMF.h.
References AllowReciprocal, and B.
Referenced by getDecodedFastMathFlags().
Definition at line 95 of file FMF.h.
References ApproxFunc, and B.
Referenced by getDecodedFastMathFlags().
Definition at line 83 of file FMF.h.
Referenced by getDecodedFastMathFlags().
Definition at line 80 of file FMF.h.
Referenced by getDecodedFastMathFlags(), and llvm::RecurrenceDescriptor::isReductionPHI().
Definition at line 86 of file FMF.h.
References B, and NoSignedZeros.
Referenced by getDecodedFastMathFlags(), llvm::RecurrenceDescriptor::isReductionPHI(), and llvm::matchDecomposedSelectPattern().
|
friend |