LLVM: llvm::sandboxir::ConstantFP Class Reference (original ) (raw )#include "[llvm/SandboxIR/Constant.h](SandboxIR%5F2Constant%5F8h%5Fsource.html)"
Static Public Member Functions
static LLVM_ABI Constant *
get (Type *Ty, double V)
This returns a ConstantFP , or a vector containing a splat of a ConstantFP , for the specified value in the specified type.
static LLVM_ABI Constant *
get (Type *Ty, const APFloat &V)
If Ty is a vector type, return a Constant with a splat of the given value.
static LLVM_ABI Constant *
get (Type *Ty, StringRef Str)
static LLVM_ABI ConstantFP *
get (const APFloat &V, Context &Ctx )
static LLVM_ABI Constant *
getNaN (Type *Ty, bool Negative=false, uint64_t Payload=0)
static LLVM_ABI Constant *
getQNaN (Type *Ty, bool Negative=false, APInt *Payload=nullptr)
static LLVM_ABI Constant *
getSNaN (Type *Ty, bool Negative=false, APInt *Payload=nullptr)
static LLVM_ABI Constant *
getZero (Type *Ty, bool Negative=false)
static LLVM_ABI Constant *
getNegativeZero (Type *Ty)
static LLVM_ABI Constant *
getInfinity (Type *Ty, bool Negative=false)
static LLVM_ABI bool
isValueValidForType (Type *Ty, const APFloat &V)
Return true if Ty is big enough to represent V.
static bool
classof (const sandboxir::Value *From)
For isa/dyn_cast.
Static Public Member Functions inherited from llvm::sandboxir::Constant
static bool
classof (const sandboxir::Value *From)
For isa/dyn_cast.
Static Public Member Functions inherited from llvm::sandboxir::User
static bool
classof (const Value *From)
For isa/dyn_cast.
Additional Inherited Members
Public Types inherited from llvm::sandboxir::User
using
op_iterator = OperandUseIterator
using
const_op_iterator = OperandUseIterator
using
op_range = iterator_range <op_iterator >
using
const_op_range = iterator_range <const_op_iterator >
Public Types inherited from llvm::sandboxir::Value
enum class
ClassID : unsigned
using
use_iterator = UserUseIterator
using
const_use_iterator = UserUseIterator
using
user_iterator = mapped_iterator <sandboxir::UserUseIterator , UseToUser >
using
const_user_iterator = user_iterator
Protected Member Functions inherited from llvm::sandboxir::Constant
Constant (llvm::Constant *C , sandboxir::Context &SBCtx)
Constant (ClassID ID , llvm::Constant *C , sandboxir::Context &SBCtx)
Use
getOperandUseInternal (unsigned OpIdx , bool Verify ) const override
\Returns the Use for the OpIdx'th operand.
Protected Member Functions inherited from llvm::sandboxir::User
User (ClassID ID , llvm::Value *V, Context &Ctx )
Use
getOperandUseDefault (unsigned OpIdx , bool Verify ) const
\Returns the Use edge that corresponds to OpIdx.
unsigned
getUseOperandNoDefault (const Use &Use ) const
The default implementation works only for single-LLVMIR-instruction Users and only if they match exactly the LLVM instruction.
void
swapOperandsInternal (unsigned OpIdxA, unsigned OpIdxB)
void
verifyUserOfLLVMUse (const llvm::Use &Use ) const
Protected Member Functions inherited from llvm::sandboxir::Value
void
clearValue ()
LLVM_ABI
Value (ClassID SubclassID , llvm::Value *Val , Context &Ctx )
Value (const Value &)=delete
Disable copies.
Value &
operator= (const Value &)=delete
Static Protected Member Functions inherited from llvm::sandboxir::Value
static const char *
getSubclassIDStr (ClassID ID )
Protected Attributes inherited from llvm::sandboxir::Value
ClassID
SubclassID
For isa/dyn_cast.
unsigned
UID
A unique ID used for forming the name (used for debugging).
llvm::Value *
Val = nullptr
The LLVM Value that corresponds to this SandboxIR Value .
Context &
Ctx
All values point to the context.
Definition at line 259 of file Constant.h .
◆ classof()◆ dumpOS()
void llvm::sandboxir::ConstantFP::dumpOS ( raw_ostream & OS ) const
inlineoverridevirtual
◆ get() [1/4]◆ get() [2/4]◆ get() [3/4]
Constant * llvm::sandboxir::ConstantFP::get ( Type * Ty , double V )
static
◆ get() [4/4]◆ getInfinity()
Constant * llvm::sandboxir::ConstantFP::getInfinity ( Type * Ty , bool Negative = false )
static
◆ getNaN()◆ getNegativeZero()
Constant * llvm::sandboxir::ConstantFP::getNegativeZero ( Type * Ty )
static
◆ getQNaN()
Constant * llvm::sandboxir::ConstantFP::getQNaN ( Type * Ty , bool Negative = false, APInt * Payload = nullptr )
static
◆ getSNaN()
Constant * llvm::sandboxir::ConstantFP::getSNaN ( Type * Ty , bool Negative = false, APInt * Payload = nullptr )
static
◆ getUseOperandNo()
unsigned llvm::sandboxir::ConstantFP::getUseOperandNo ( const Use & Use ) const
inlinefinalvirtual
◆ getValue()
const APFloat & llvm::sandboxir::ConstantFP::getValue ( ) const
inline
◆ getValueAPF()
const APFloat & llvm::sandboxir::ConstantFP::getValueAPF ( ) const
inline
◆ getZero()
Constant * llvm::sandboxir::ConstantFP::getZero ( Type * Ty , bool Negative = false )
static
◆ isExactlyValue() [1/2]
bool llvm::sandboxir::ConstantFP::isExactlyValue ( const APFloat & V ) const
inline
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. The version with a double operand is retained because it's so convenient to write isExactlyValue(2.0), but please use it only for simple constants.
Definition at line 318 of file Constant.h .
References llvm::cast() , and llvm::sandboxir::Value::Val .
◆ isExactlyValue() [2/2]
bool llvm::sandboxir::ConstantFP::isExactlyValue ( double V ) const
inline
◆ isInfinity()
bool llvm::sandboxir::ConstantFP::isInfinity ( ) const
inline
◆ isNaN()
bool llvm::sandboxir::ConstantFP::isNaN ( ) const
inline
◆ isNegative()
bool llvm::sandboxir::ConstantFP::isNegative ( ) const
inline
◆ isValueValidForType()◆ isZero()
bool llvm::sandboxir::ConstantFP::isZero ( ) const
inline
◆ verify()
void llvm::sandboxir::ConstantFP::verify ( ) const
inlineoverridevirtual
◆ Context
The documentation for this class was generated from the following files: