14 #ifndef LLVM_IR_CONSTANT_H
15 #define LLVM_IR_CONSTANT_H
22 template<
typename T>
class SmallVectorImpl;
42 void operator=(
const Constant &) =
delete;
44 void anchor()
override;
48 :
User(ty, vty, Ops, NumOps) {}
Constant * getSplatValue() const
getSplatValue - If this is a splat vector constant, meaning that all of the elements have the same va...
static bool classof(const Value *V)
bool isOneValue() const
Returns true if the value is one.
const APInt & getUniqueInteger() const
If C is a constant integer then return its value, otherwise C must be a vector of constant integers...
static Constant * getNullValue(Type *Ty)
bool isNegativeZeroValue() const
isNegativeZeroValue - Return true if the value is what would be returned by getZeroValueForNegation.
const Constant * stripPointerCasts() const
A Use represents the edge between a Value definition and its users.
void handleOperandChange(Value *, Value *, Use *)
This method is a special form of User::replaceUsesOfWith (which does not work on constants) that does...
bool isDLLImportDependent() const
Return true if the value is dependent on a dllimport variable.
bool isConstantUsed() const
isConstantUsed - Return true if the constant has users other than constant exprs and other dangling t...
Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
bool isNotMinSignedValue() const
Return true if the value is not the smallest signed value.
Constant * stripPointerCasts()
The instances of the Type class are immutable: once they are created, they are never changed...
bool canTrap() const
canTrap - Return true if evaluation of this constant could trap.
This is an important base class in LLVM.
bool isZeroValue() const
Return true if the value is negative zero or null value.
unsigned getValueID() const
Return an ID for the concrete type of this object.
Constant * getAggregateElement(unsigned Elt) const
getAggregateElement - For aggregates (struct/array/vector) return the constant that corresponds to th...
static Constant * getAllOnesValue(Type *Ty)
Get the all ones value.
static Constant * getIntegerValue(Type *Ty, const APInt &V)
getIntegerValue - Return the value for an integer or pointer constant, or a vector thereof...
PossibleRelocationsTy getRelocationInfo() const
getRelocationInfo - This method classifies the entry according to whether or not it may generate a re...
Value * stripPointerCasts()
Strip off pointer casts, all-zero GEPs, and aliases.
bool isNullValue() const
isNullValue - Return true if this is the value that would be returned by getNullValue.
ValueTy
Concrete subclass of this.
bool isAllOnesValue() const
isAllOnesValue - Return true if this is the value that would be returned by getAllOnesValue.
Class for arbitrary precision integers.
void destroyConstant()
Called if some element of this constant is no longer valid.
void removeDeadConstantUsers() const
removeDeadConstantUsers - If there are any dead constant users dangling off of this constant...
LLVM Value Representation.
bool isThreadDependent() const
isThreadDependent - Return true if the value can vary between threads.
bool isMinSignedValue() const
Return true if the value is the smallest signed value.