LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::FPMathOperator Class Reference

#include <Operator.h>

Inheritance diagram for llvm::FPMathOperator:
Inheritance graph
[legend]
Collaboration diagram for llvm::FPMathOperator:
Collaboration graph
[legend]

Public Member Functions

bool hasUnsafeAlgebra () const
 
bool hasNoNaNs () const
 
bool hasNoInfs () const
 
bool hasNoSignedZeros () const
 
bool hasAllowReciprocal () const
 
FastMathFlags getFastMathFlags () const
 Convenience function for getting all the fast-math flags. More...
 
float getFPAccuracy () const
 Get the maximum error permitted by this operation in ULPs. An accuracy of 0.0 means that the operation should be performed with the default precision. More...
 
- Public Member Functions inherited from llvm::Operator
unsigned getOpcode () const
 
- Public Member Functions inherited from llvm::User
 ~User ()
 
void operator delete (void *Usr)
 operator delete - free memory allocated for User and Use objects More...
 
void operator delete (void *, unsigned)
 placement delete - required by std, but never called. More...
 
void operator delete (void *, unsigned, bool)
 placement delete - required by std, but never called. More...
 
ValuegetOperand (unsigned i) const
 
void setOperand (unsigned i, Value *Val)
 
const UsegetOperandUse (unsigned i) const
 
UsegetOperandUse (unsigned i)
 
unsigned getNumOperands () const
 
op_iterator op_begin ()
 
const_op_iterator op_begin () const
 
op_iterator op_end ()
 
const_op_iterator op_end () const
 
value_op_iterator value_op_begin ()
 
value_op_iterator value_op_end ()
 
void dropAllReferences ()
 
void replaceUsesOfWith (Value *From, Value *To)
 
- Public Member Functions inherited from llvm::Value
virtual ~Value ()
 
void dump () const
 dump - Support for debugging, callable in GDB: V->dump() More...
 
void print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const
 
TypegetType () const
 
LLVMContextgetContext () const
 All values hold a context through their type. More...
 
bool hasName () const
 
ValueNamegetValueName () const
 
void setValueName (ValueName *VN)
 
StringRef getName () const
 
void setName (const Twine &Name)
 
void takeName (Value *V)
 
void replaceAllUsesWith (Value *V)
 
bool use_empty () const
 
use_iterator use_begin ()
 
const_use_iterator use_begin () const
 
use_iterator use_end ()
 
const_use_iterator use_end () const
 
Useruse_back ()
 
const Useruse_back () const
 
bool hasOneUse () const
 
bool hasNUses (unsigned N) const
 
bool hasNUsesOrMore (unsigned N) const
 
bool isUsedInBasicBlock (const BasicBlock *BB) const
 
unsigned getNumUses () const
 
void addUse (Use &U)
 
unsigned getValueID () const
 
unsigned getRawSubclassOptionalData () const
 
void clearSubclassOptionalData ()
 
bool hasSameSubclassOptionalData (const Value *V) const
 
void intersectOptionalDataWith (const Value *V)
 
bool hasValueHandle () const
 
ValuestripPointerCasts ()
 Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More...
 
const ValuestripPointerCasts () const
 
ValuestripPointerCastsNoFollowAliases ()
 Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More...
 
const ValuestripPointerCastsNoFollowAliases () const
 
ValuestripInBoundsConstantOffsets ()
 Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More...
 
const ValuestripInBoundsConstantOffsets () const
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More...
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 
ValuestripInBoundsOffsets ()
 Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More...
 
const ValuestripInBoundsOffsets () const
 
bool isDereferenceablePointer () const
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 
void mutateType (Type *Ty)
 

Static Public Member Functions

static bool classof (const Instruction *I)
 
static bool classof (const Value *V)
 
- Static Public Member Functions inherited from llvm::Operator
static unsigned getOpcode (const Value *V)
 
static bool classof (const Instruction *)
 
static bool classof (const ConstantExpr *)
 
static bool classof (const Value *V)
 
- Static Public Member Functions inherited from llvm::User
static bool classof (const Value *V)
 

Friends

class Instruction
 

Additional Inherited Members

- Public Types inherited from llvm::User
typedef Useop_iterator
 
typedef const Useconst_op_iterator
 
- Public Types inherited from llvm::Value
enum  ValueTy {
  ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal,
  GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal,
  ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal,
  ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal,
  ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal,
  PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal,
  ConstantLastVal = ConstantPointerNullVal
}
 
typedef value_use_iterator< Useruse_iterator
 
typedef value_use_iterator
< const User
const_use_iterator
 
- Static Public Attributes inherited from llvm::Value
static const unsigned MaximumAlignment = 1u << 29
 
- Protected Member Functions inherited from llvm::Operator
 ~Operator ()
 
- Protected Member Functions inherited from llvm::User
void * operator new (size_t s, unsigned Us)
 
 User (Type *ty, unsigned vty, Use *OpList, unsigned NumOps)
 
UseallocHungoffUses (unsigned) const
 
void dropHungoffUses ()
 
template<int Idx>
UseOp ()
 
template<int Idx>
const UseOp () const
 
- Protected Member Functions inherited from llvm::Value
virtual void printCustom (raw_ostream &O) const
 
 Value (Type *Ty, unsigned scid)
 
unsigned short getSubclassDataFromValue () const
 
void setValueSubclassData (unsigned short D)
 
- Static Protected Member Functions inherited from llvm::User
template<int Idx, typename U >
static UseOpFrom (const U *that)
 
- Protected Attributes inherited from llvm::User
UseOperandList
 
unsigned NumOperands
 
- Protected Attributes inherited from llvm::Value
unsigned char SubclassOptionalData: 7
 

Detailed Description

FPMathOperator - Utility class for floating point operations which can have information about relaxed accuracy requirements attached to them.

Definition at line 218 of file Operator.h.

Member Function Documentation

static bool llvm::FPMathOperator::classof ( const Instruction I)
inlinestatic

Definition at line 302 of file Operator.h.

References llvm::Value::getType(), and llvm::Type::isFPOrFPVectorTy().

static bool llvm::FPMathOperator::classof ( const Value V)
inlinestatic

Definition at line 305 of file Operator.h.

References llvm::PossiblyExactOperator::classof().

FastMathFlags llvm::FPMathOperator::getFastMathFlags ( ) const
inline

Convenience function for getting all the fast-math flags.

Definition at line 293 of file Operator.h.

References llvm::Value::SubclassOptionalData.

float FPMathOperator::getFPAccuracy ( ) const

Get the maximum error permitted by this operation in ULPs. An accuracy of 0.0 means that the operation should be performed with the default precision.

getFPAccuracy - Get the maximum error permitted by this operation in ULPs. An accuracy of 0.0 means that the operation should be performed with the default precision.

Definition at line 2028 of file Instructions.cpp.

References llvm::APFloat::convertToFloat(), llvm::MDNode::getOperand(), llvm::ConstantFP::getValueAPF(), and llvm::LLVMContext::MD_fpmath.

bool llvm::FPMathOperator::hasAllowReciprocal ( ) const
inline

Test whether this operation is permitted to use reciprocal instead of division, aka the 'R' fast-math property.

Definition at line 288 of file Operator.h.

References llvm::FastMathFlags::AllowReciprocal, and llvm::Value::SubclassOptionalData.

bool llvm::FPMathOperator::hasNoInfs ( ) const
inline

Test whether this operation's arguments and results are to be treated as NoN-Inf, aka the 'I' fast-math property.

Definition at line 276 of file Operator.h.

References llvm::FastMathFlags::NoInfs, and llvm::Value::SubclassOptionalData.

bool llvm::FPMathOperator::hasNoNaNs ( ) const
inline

Test whether this operation's arguments and results are to be treated as non-NaN, aka the 'N' fast-math property.

Definition at line 270 of file Operator.h.

References llvm::FastMathFlags::NoNaNs, and llvm::Value::SubclassOptionalData.

bool llvm::FPMathOperator::hasNoSignedZeros ( ) const
inline

Test whether this operation can treat the sign of zero as insignificant, aka the 'S' fast-math property.

Definition at line 282 of file Operator.h.

References llvm::FastMathFlags::NoSignedZeros, and llvm::Value::SubclassOptionalData.

bool llvm::FPMathOperator::hasUnsafeAlgebra ( ) const
inline

Test whether this operation is permitted to be algebraically transformed, aka the 'A' fast-math property.

Definition at line 264 of file Operator.h.

References llvm::Value::SubclassOptionalData.

Friends And Related Function Documentation

friend class Instruction
friend

Definition at line 220 of file Operator.h.


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