LLVM
15.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. More... | |
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. More... | |
void | setAllowReassoc (bool B=true) |
Flag setters. More... | |
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 . More... | |
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 71 of file FMF.h.
References AllowContract.
Referenced by llvm::MachineInstr::copyFlagsFromInstruction(), instCombineSVEVectorFMLA(), and print().
|
inline |
Flag queries.
Definition at line 66 of file FMF.h.
References AllowReassoc.
Referenced by llvm::MachineInstr::copyFlagsFromInstruction(), getISDForVPIntrinsic(), print(), SimplifyFAddInst(), SimplifyFDivInst(), SimplifyFMAFMul(), and SimplifyFSubInst().
|
inline |
Definition at line 70 of file FMF.h.
References AllowReciprocal.
Referenced by llvm::MachineInstr::copyFlagsFromInstruction(), and print().
|
inline |
Definition at line 72 of file FMF.h.
References ApproxFunc.
Referenced by llvm::MachineInstr::copyFlagsFromInstruction(), and print().
|
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 llvm::MachineInstr::copyFlagsFromInstruction(), foldFNegIntoConstant(), print(), and simplifyFPOp().
|
inline |
Definition at line 67 of file FMF.h.
References NoNaNs.
Referenced by llvm::canIgnoreSNaN(), llvm::MachineInstr::copyFlagsFromInstruction(), isKnownNonNaN(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), print(), SimplifyFAddInst(), SimplifyFCmpInst(), SimplifyFDivInst(), SimplifyFMAFMul(), simplifyFPOp(), SimplifyFRemInst(), and SimplifyFSubInst().
|
inline |
Definition at line 69 of file FMF.h.
References NoSignedZeros.
Referenced by llvm::MachineInstr::copyFlagsFromInstruction(), foldFNegIntoConstant(), 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 230 of file Operator.cpp.
References all(), allowContract(), allowReassoc(), allowReciprocal(), approxFunc(), noInfs(), noNaNs(), noSignedZeros(), and llvm::RISCVFenceField::O.
Referenced by llvm::operator<<().
|
inline |
|
inline |
Definition at line 92 of file FMF.h.
References AllowContract, and B.
Referenced by getDecodedFastMathFlags().
|
inline |
Flag setters.
Definition at line 77 of file FMF.h.
References AllowReassoc, and B.
Referenced by getDecodedFastMathFlags().
|
inline |
Definition at line 89 of file FMF.h.
References AllowReciprocal, and B.
Referenced by getDecodedFastMathFlags().
|
inline |
Definition at line 95 of file FMF.h.
References ApproxFunc, and B.
Referenced by getDecodedFastMathFlags().
|
inline |
|
inline |
Definition at line 83 of file FMF.h.
Referenced by getDecodedFastMathFlags().
|
inline |
Definition at line 80 of file FMF.h.
Referenced by getDecodedFastMathFlags(), and llvm::RecurrenceDescriptor::isReductionPHI().
|
inline |
Definition at line 86 of file FMF.h.
References B, and NoSignedZeros.
Referenced by getDecodedFastMathFlags(), llvm::RecurrenceDescriptor::isReductionPHI(), and llvm::matchDecomposedSelectPattern().
|
friend |