14 #ifndef LLVM_IR_CONSTANT_H
15 #define LLVM_IR_CONSTANT_H
43 void anchor()
override;
47 :
User(ty, vty, Ops, NumOps) {}
166 #endif // LLVM_IR_CONSTANT_H
Constant * getSplatValue() const
If this is a splat vector constant, meaning that all of the elements have the same value...
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)
Constructor to create a '0' constant of arbitrary type.
bool isNegativeZeroValue() const
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.
bool isDLLImportDependent() const
Return true if the value is dependent on a dllimport variable.
bool isConstantUsed() const
Return true if the constant has users other than constant expressions and other dangling things...
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
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.
bool needsRelocation() const
This method classifies the entry according to whether or not it may generate a relocation entry...
Constant * getAggregateElement(unsigned Elt) const
For aggregates (struct/array/vector) return the constant that corresponds to the specified element if...
static Constant * getAllOnesValue(Type *Ty)
Get the all ones value.
static Constant * getIntegerValue(Type *Ty, const APInt &V)
Return the value for an integer or pointer constant, or a vector thereof, with the given scalar value...
Value * stripPointerCasts()
Strip off pointer casts, all-zero GEPs, and aliases.
bool isNullValue() const
Return true if this is the value that would be returned by getNullValue.
ValueTy
Concrete subclass of this.
void handleOperandChange(Value *, Value *)
This method is a special form of User::replaceUsesOfWith (which does not work on constants) that does...
bool isAllOnesValue() const
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
If there are any dead constant users dangling off of this constant, remove them.
LLVM Value Representation.
void operator=(const Constant &)=delete
bool isThreadDependent() const
Return true if the value can vary between threads.
bool isMinSignedValue() const
Return true if the value is the smallest signed value.