LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::ConstantFP Class Reference

#include <Constants.h>

Inheritance diagram for llvm::ConstantFP:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

double getValue () const
virtual bool isNullValue () const
bool isExactlyValue (double V) const

Static Public Member Functions

static ConstantFPget (const Type *Ty, double V)
 get() - Static factory methods - Return objects of the specified value
static bool isValueValidForType (const Type *Ty, double V)
 isValueValidForType - return true if Ty is big enough to represent V.
static bool classof (const ConstantFP *)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)

Protected Member Functions

 ConstantFP (const Type *Ty, double V)

Friends

struct ConstantCreator< ConstantFP, Type, uint64_t >
struct ConstantCreator< ConstantFP, Type, uint32_t >

Detailed Description

ConstantFP - Floating Point Values [float, double]

Definition at line 261 of file Constants.h.


Constructor & Destructor Documentation

ConstantFP::ConstantFP const Type Ty,
double  V
[protected]
 

Definition at line 241 of file Constants.cpp.

References isValueValidForType().


Member Function Documentation

static bool llvm::ConstantFP::classof const Value V  )  [inline, static]
 

Reimplemented from llvm::Constant.

Definition at line 308 of file Constants.h.

References llvm::Value::getType(), llvm::Value::getValueType(), llvm::Type::isFloatingPoint(), and llvm::Value::SimpleConstantVal.

static bool llvm::ConstantFP::classof const ConstantFP  )  [inline, static]
 

Methods for support type inquiry through isa, cast, and dyn_cast:.

Definition at line 307 of file Constants.h.

ConstantFP * ConstantFP::get const Type Ty,
double  V
[static]
 

get() - Static factory methods - Return objects of the specified value

Definition at line 796 of file Constants.cpp.

References llvm::Type::DoubleTy, F, and llvm::Type::FloatTy.

Referenced by llvm::ConstantFoldCall(), ConstantFoldFP(), llvm::BinaryOperator::createNeg(), llvm::SCEVUnknown::getIntegerSCEV(), llvm::ConstantExpr::getNeg(), llvm::Constant::getNullValue(), llvm::BinaryOperator::isNeg(), llvm::BytecodeReader::ParseConstantValue(), and llvm::JIT::runFunction().

double llvm::ConstantFP::getValue  )  const [inline]
 

Definition at line 274 of file Constants.h.

Referenced by isFPCSafeToPrint().

bool llvm::ConstantFP::isExactlyValue double  V  )  const [inline]
 

isExactlyValue - We don't rely on operator== working on double values, as it returns true for things that are clearly not equal, like -0.0 and 0.0. As such, this method can be used to do an exact bit-for-bit comparison of two floating point values.

Definition at line 292 of file Constants.h.

References I.

virtual bool llvm::ConstantFP::isNullValue  )  const [inline, virtual]
 

isNullValue - Return true if this is the value that would be returned by getNullValue. Don't depend on == for doubles to tell us it's zero, it considers -0.0 to be null as well as 0.0. :(

Implements llvm::Constant.

Definition at line 279 of file Constants.h.

References I, and V.

bool ConstantFP::isValueValidForType const Type Ty,
double  V
[static]
 

isValueValidForType - return true if Ty is big enough to represent V.

Definition at line 438 of file Constants.cpp.

References llvm::Type::DoubleTyID, llvm::Type::FloatTyID, and llvm::Type::getTypeID().

Referenced by ConstantFP().


Friends And Related Function Documentation

friend struct ConstantCreator< ConstantFP, Type, uint32_t > [friend]
 

Definition at line 264 of file Constants.h.

friend struct ConstantCreator< ConstantFP, Type, uint64_t > [friend]
 

Definition at line 263 of file Constants.h.


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