LLVM API Documentation
#include <Constants.h>
Inheritance diagram for llvm::ConstantFP:
Public Member Functions | |
double | getValue () const |
virtual bool | isNullValue () const |
bool | isExactlyValue (double V) const |
Static Public Member Functions | |
static ConstantFP * | get (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 > |
Definition at line 273 of file Constants.h.
ConstantFP::ConstantFP | ( | const Type * | Ty, | |
double | V | |||
) | [protected] |
ConstantFP * ConstantFP::get | ( | const Type * | Ty, | |
double | V | |||
) | [static] |
get() - Static factory methods - Return objects of the specified value
Definition at line 930 of file Constants.cpp.
References DoubleConstants, llvm::DoubleToBits(), llvm::Type::DoubleTy, FloatConstants, llvm::FloatToBits(), and llvm::Type::FloatTy.
Referenced by llvm::ConstantFoldCall(), llvm::ConstantFoldFP(), llvm::BinaryOperator::createNeg(), llvm::SCEVUnknown::getIntegerSCEV(), llvm::ConstantExpr::getNeg(), llvm::Constant::getNullValue(), llvm::BinaryOperator::isNeg(), llvm::BytecodeReader::ParseConstantPoolValue(), llvm::JIT::runFunction(), and llvm::SCEVExpander::visitAddRecExpr().
bool ConstantFP::isValueValidForType | ( | const Type * | Ty, | |
double | V | |||
) | [static] |
isValueValidForType - return true if Ty is big enough to represent V.
Definition at line 623 of file Constants.cpp.
References llvm::Type::DoubleTyID, llvm::Type::FloatTyID, and llvm::Type::getTypeID().
Referenced by ConstantFP().
double llvm::ConstantFP::getValue | ( | ) | const [inline] |
bool ConstantFP::isNullValue | ( | ) | const [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 921 of file Constants.cpp.
References llvm::DoubleToBits().
bool ConstantFP::isExactlyValue | ( | double | V | ) | const |
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 925 of file Constants.cpp.
References llvm::DoubleToBits().
static bool llvm::ConstantFP::classof | ( | const ConstantFP * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Definition at line 300 of file Constants.h.
static bool llvm::ConstantFP::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::Constant.
Definition at line 301 of file Constants.h.
References llvm::Value::ConstantFPVal, and V.
friend struct ConstantCreator< ConstantFP, Type, uint64_t > [friend] |
Definition at line 275 of file Constants.h.
friend struct ConstantCreator< ConstantFP, Type, uint32_t > [friend] |
Definition at line 276 of file Constants.h.