LLVM
8.0.1
|
Convenience struct for specifying and reasoning about fast-math flags. More...
#include "llvm/IR/Operator.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) |
Friends | |
class | FPMathOperator |
Convenience struct for specifying and reasoning about fast-math flags.
Definition at line 160 of file Operator.h.
anonymous enum |
Enumerator | |
---|---|
AllowReassoc | |
NoNaNs | |
NoInfs | |
NoSignedZeros | |
AllowReciprocal | |
AllowContract | |
ApproxFunc |
Definition at line 179 of file Operator.h.
|
default |
|
inline |
Definition at line 193 of file Operator.h.
|
inline |
Definition at line 204 of file Operator.h.
References llvm::bitc::AllowContract.
Referenced by llvm::MachineInstr::copyIRFlags().
|
inline |
Flag queries.
Definition at line 199 of file Operator.h.
References llvm::bitc::AllowReassoc.
Referenced by llvm::MachineInstr::copyIRFlags(), SimplifyFAddInst(), SimplifyFDivInst(), SimplifyFMulInst(), and SimplifyFSubInst().
|
inline |
Definition at line 203 of file Operator.h.
References llvm::bitc::AllowReciprocal.
Referenced by llvm::MachineInstr::copyIRFlags(), and shouldKeepFDivF32().
|
inline |
Definition at line 191 of file Operator.h.
Referenced by FunctionNumber().
|
inline |
Definition at line 205 of file Operator.h.
References llvm::bitc::ApproxFunc.
Referenced by llvm::MachineInstr::copyIRFlags().
|
inline |
Definition at line 195 of file Operator.h.
Referenced by llvm::IRBuilderBase::clearFastMathFlags().
|
inline |
'Fast' means all bits are set.
Definition at line 207 of file Operator.h.
References llvm::LegalityPredicates::all().
Referenced by addStackMapLiveVars(), and shouldKeepFDivF32().
|
inline |
Definition at line 201 of file Operator.h.
References llvm::bitc::NoInfs.
Referenced by llvm::MachineInstr::copyIRFlags().
|
inline |
Definition at line 200 of file Operator.h.
References llvm::bitc::NoNaNs.
Referenced by llvm::MachineInstr::copyIRFlags(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), isKnownNonNaN(), SimplifyFAddInst(), SimplifyFCmpInst(), SimplifyFDivInst(), SimplifyFMulInst(), SimplifyFRemInst(), and SimplifyFSubInst().
|
inline |
Definition at line 192 of file Operator.h.
|
inline |
Definition at line 202 of file Operator.h.
References llvm::bitc::NoSignedZeros.
Referenced by llvm::MachineInstr::copyIRFlags(), matchSelectPattern(), SimplifyFAddInst(), SimplifyFDivInst(), SimplifyFMulInst(), and SimplifyFSubInst().
|
inline |
Definition at line 233 of file Operator.h.
|
inline |
Definition at line 196 of file Operator.h.
Definition at line 225 of file Operator.h.
References llvm::bitc::AllowContract.
Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().
Flag setters.
Definition at line 210 of file Operator.h.
References llvm::bitc::AllowReassoc.
Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().
Definition at line 222 of file Operator.h.
References llvm::bitc::AllowReciprocal.
Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().
Definition at line 228 of file Operator.h.
References llvm::bitc::ApproxFunc.
Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().
Definition at line 231 of file Operator.h.
References clear().
Referenced by addFastMathFlag(), llvm::createMinMaxOp(), createRdxShuffleMask(), llvm::createSimpleTargetReduction(), llvm::InnerLoopVectorizer::emitTransformedIndex(), llvm::LLParser::getContext(), getDecodedFastMathFlags(), getMulHu(), getSqrtCall(), and llvm::InnerLoopVectorizer::getStepVector().
Definition at line 216 of file Operator.h.
References llvm::bitc::NoInfs.
Referenced by llvm::LLParser::getContext(), and getDecodedFastMathFlags().
Definition at line 213 of file Operator.h.
References llvm::bitc::NoNaNs.
Referenced by llvm::IRBuilderBase::CreateFPMaxReduce(), llvm::IRBuilderBase::CreateFPMinReduce(), llvm::LLParser::getContext(), getDecodedFastMathFlags(), and getSqrtCall().
Definition at line 219 of file Operator.h.
References llvm::bitc::NoSignedZeros.
Referenced by llvm::LLParser::getContext(), getDecodedFastMathFlags(), getSqrtCall(), and llvm::matchSelectPattern().
|
friend |
Definition at line 162 of file Operator.h.