// AllocaInst Class
//===----------------------------------------------------------------------===//
-/// AllocaInst - an instruction to allocate memory on the stack
-///
+/// an instruction to allocate memory on the stack
class AllocaInst : public UnaryInstruction {
Type *AllocatedType;
// Out of line virtual method, so the vtable, etc. has a home.
~AllocaInst() override;
- /// isArrayAllocation - Return true if there is an allocation size parameter
- /// to the allocation instruction that is not 1.
- ///
+ /// Return true if there is an allocation size parameter to the allocation
+ /// instruction that is not 1.
bool isArrayAllocation() const;
- /// getArraySize - Get the number of elements allocated. For a simple
- /// allocation of a single element, this will return a constant 1 value.
- ///
+ /// Get the number of elements allocated. For a simple allocation of a single
+ /// element, this will return a constant 1 value.
const Value *getArraySize() const { return getOperand(0); }
Value *getArraySize() { return getOperand(0); }
- /// getType - Overload to return most specific pointer type
- ///
+ /// Overload to return most specific pointer type.
PointerType *getType() const {
return cast<PointerType>(Instruction::getType());
}
- /// getAllocatedType - Return the type that is being allocated by the
- /// instruction.
- ///
+ /// Return the type that is being allocated by the instruction.
Type *getAllocatedType() const { return AllocatedType; }
- /// \brief for use only in special circumstances that need to generically
+ /// for use only in special circumstances that need to generically
/// transform a whole instruction (eg: IR linking and vectorization).
void setAllocatedType(Type *Ty) { AllocatedType = Ty; }
- /// getAlignment - Return the alignment of the memory that is being allocated
- /// by the instruction.
- ///
+ /// Return the alignment of the memory that is being allocated by the
+ /// instruction.
unsigned getAlignment() const {
return (1u << (getSubclassDataFromInstruction() & 31)) >> 1;
}
void setAlignment(unsigned Align);
- /// isStaticAlloca - Return true if this alloca is in the entry block of the
- /// function and is a constant size. If so, the code generator will fold it
- /// into the prolog/epilog code, so it is basically free.
+ /// Return true if this alloca is in the entry block of the function and is a
+ /// constant size. If so, the code generator will fold it into the
+ /// prolog/epilog code, so it is basically free.
bool isStaticAlloca() const;
- /// \brief Return true if this alloca is used as an inalloca argument to a
- /// call. Such allocas are never considered static even if they are in the
- /// entry block.
+ /// Return true if this alloca is used as an inalloca argument to a call. Such
+ /// allocas are never considered static even if they are in the entry block.
bool isUsedWithInAlloca() const {
return getSubclassDataFromInstruction() & 32;
}
- /// \brief Specify whether this alloca is used to represent the arguments to
- /// a call.
+ /// Specify whether this alloca is used to represent the arguments to a call.
void setUsedWithInAlloca(bool V) {
setInstructionSubclassData((getSubclassDataFromInstruction() & ~32) |
(V ? 32 : 0));
}
- /// \brief Return true if this alloca is used as a swifterror argument to a
- /// call.
+ /// Return true if this alloca is used as a swifterror argument to a call.
bool isSwiftError() const {
return getSubclassDataFromInstruction() & 64;
}
- /// \brief Specify whether this alloca is used to represent a swifterror.
+ /// Specify whether this alloca is used to represent a swifterror.
void setSwiftError(bool V) {
setInstructionSubclassData((getSubclassDataFromInstruction() & ~64) |
(V ? 64 : 0));
// LoadInst Class
//===----------------------------------------------------------------------===//
-/// LoadInst - an instruction for reading from memory. This uses the
-/// SubclassData field in Value to store whether or not the load is volatile.
-///
+/// An instruction for reading from memory. This uses the SubclassData field in
+/// Value to store whether or not the load is volatile.
class LoadInst : public UnaryInstruction {
void AssertOK();
LoadInst(Value *Ptr, const char *NameStr, bool isVolatile,
BasicBlock *InsertAtEnd);
- /// isVolatile - Return true if this is a load from a volatile memory
- /// location.
- ///
+ /// Return true if this is a load from a volatile memory location.
bool isVolatile() const { return getSubclassDataFromInstruction() & 1; }
- /// setVolatile - Specify whether this is a volatile load or not.
- ///
+ /// Specify whether this is a volatile load or not.
void setVolatile(bool V) {
setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) |
(V ? 1 : 0));
}
- /// getAlignment - Return the alignment of the access that is being performed
- ///
+ /// Return the alignment of the access that is being performed.
unsigned getAlignment() const {
return (1 << ((getSubclassDataFromInstruction() >> 1) & 31)) >> 1;
}
const Value *getPointerOperand() const { return getOperand(0); }
static unsigned getPointerOperandIndex() { return 0U; }
- /// \brief Returns the address space of the pointer operand.
+ /// Returns the address space of the pointer operand.
unsigned getPointerAddressSpace() const {
return getPointerOperand()->getType()->getPointerAddressSpace();
}
// StoreInst Class
//===----------------------------------------------------------------------===//
-/// StoreInst - an instruction for storing to memory
-///
+/// An instruction for storing to memory.
class StoreInst : public Instruction {
void *operator new(size_t, unsigned) = delete;
void AssertOK();
SynchronizationScope SynchScope,
BasicBlock *InsertAtEnd);
- /// isVolatile - Return true if this is a store to a volatile memory
- /// location.
- ///
+ /// Return true if this is a store to a volatile memory location.
bool isVolatile() const { return getSubclassDataFromInstruction() & 1; }
- /// setVolatile - Specify whether this is a volatile store or not.
- ///
+ /// Specify whether this is a volatile store or not.
void setVolatile(bool V) {
setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) |
(V ? 1 : 0));
/// Transparently provide more efficient getOperand methods.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
- /// getAlignment - Return the alignment of the access that is being performed
- ///
+ /// Return the alignment of the access that is being performed
unsigned getAlignment() const {
return (1 << ((getSubclassDataFromInstruction() >> 1) & 31)) >> 1;
}
const Value *getPointerOperand() const { return getOperand(1); }
static unsigned getPointerOperandIndex() { return 1U; }
- /// \brief Returns the address space of the pointer operand.
+ /// Returns the address space of the pointer operand.
unsigned getPointerAddressSpace() const {
return getPointerOperand()->getType()->getPointerAddressSpace();
}
// FenceInst Class
//===----------------------------------------------------------------------===//
-/// FenceInst - an instruction for ordering other memory operations
-///
+/// An instruction for ordering other memory operations.
class FenceInst : public Instruction {
void *operator new(size_t, unsigned) = delete;
void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope);
// AtomicCmpXchgInst Class
//===----------------------------------------------------------------------===//
-/// AtomicCmpXchgInst - an instruction that atomically checks whether a
+/// an instruction that atomically checks whether a
/// specified value is in a memory location, and, if it is, stores a new value
/// there. Returns the value that was loaded.
///
SynchronizationScope SynchScope,
BasicBlock *InsertAtEnd);
- /// isVolatile - Return true if this is a cmpxchg from a volatile memory
+ /// Return true if this is a cmpxchg from a volatile memory
/// location.
///
bool isVolatile() const {
return getSubclassDataFromInstruction() & 1;
}
- /// setVolatile - Specify whether this is a volatile cmpxchg.
+ /// Specify whether this is a volatile cmpxchg.
///
void setVolatile(bool V) {
setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) |
Value *getNewValOperand() { return getOperand(2); }
const Value *getNewValOperand() const { return getOperand(2); }
- /// \brief Returns the address space of the pointer operand.
+ /// Returns the address space of the pointer operand.
unsigned getPointerAddressSpace() const {
return getPointerOperand()->getType()->getPointerAddressSpace();
}
- /// \brief Returns the strongest permitted ordering on failure, given the
+ /// Returns the strongest permitted ordering on failure, given the
/// desired ordering on success.
///
/// If the comparison in a cmpxchg operation fails, there is no atomic store
// AtomicRMWInst Class
//===----------------------------------------------------------------------===//
-/// AtomicRMWInst - an instruction that atomically reads a memory location,
+/// an instruction that atomically reads a memory location,
/// combines it with another value, and then stores the result back. Returns
/// the old value.
///
(Operation << 5));
}
- /// isVolatile - Return true if this is a RMW on a volatile memory location.
+ /// Return true if this is a RMW on a volatile memory location.
///
bool isVolatile() const {
return getSubclassDataFromInstruction() & 1;
}
- /// setVolatile - Specify whether this is a volatile RMW or not.
+ /// Specify whether this is a volatile RMW or not.
///
void setVolatile(bool V) {
setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) |
Value *getValOperand() { return getOperand(1); }
const Value *getValOperand() const { return getOperand(1); }
- /// \brief Returns the address space of the pointer operand.
+ /// Returns the address space of the pointer operand.
unsigned getPointerAddressSpace() const {
return getPointerOperand()->getType()->getPointerAddressSpace();
}
return Ty;
}
-/// GetElementPtrInst - an instruction for type-safe pointer arithmetic to
+/// an instruction for type-safe pointer arithmetic to
/// access elements of arrays and structs
///
class GetElementPtrInst : public Instruction {
return ResultElementType;
}
- /// \brief Returns the address space of this instruction's pointer type.
+ /// Returns the address space of this instruction's pointer type.
unsigned getAddressSpace() const {
// Note that this is always the same as the pointer operand's address space
// and that is cheaper to compute, so cheat here.
return getPointerAddressSpace();
}
- /// getIndexedType - Returns the type of the element that would be loaded with
+ /// Returns the type of the element that would be loaded with
/// a load instruction with the specified parameters.
///
/// Null is returned if the indices are invalid for the specified
return 0U; // get index for modifying correct operand.
}
- /// getPointerOperandType - Method to return the pointer operand as a
+ /// Method to return the pointer operand as a
/// PointerType.
Type *getPointerOperandType() const {
return getPointerOperand()->getType();
}
- /// \brief Returns the address space of the pointer operand.
+ /// Returns the address space of the pointer operand.
unsigned getPointerAddressSpace() const {
return getPointerOperandType()->getPointerAddressSpace();
}
- /// GetGEPReturnType - Returns the pointer type returned by the GEP
+ /// Returns the pointer type returned by the GEP
/// instruction, which may be a vector of pointers.
static Type *getGEPReturnType(Value *Ptr, ArrayRef<Value *> IdxList) {
return getGEPReturnType(
return getNumOperands() > 1;
}
- /// hasAllZeroIndices - Return true if all of the indices of this GEP are
+ /// Return true if all of the indices of this GEP are
/// zeros. If so, the result pointer and the first operand have the same
/// value, just potentially different types.
bool hasAllZeroIndices() const;
- /// hasAllConstantIndices - Return true if all of the indices of this GEP are
+ /// Return true if all of the indices of this GEP are
/// constant integers. If so, the result pointer and the first operand have
/// a constant offset between them.
bool hasAllConstantIndices() const;
- /// setIsInBounds - Set or clear the inbounds flag on this GEP instruction.
+ /// Set or clear the inbounds flag on this GEP instruction.
/// See LangRef.html for the meaning of inbounds on a getelementptr.
void setIsInBounds(bool b = true);
- /// isInBounds - Determine whether the GEP has the inbounds flag.
+ /// Determine whether the GEP has the inbounds flag.
bool isInBounds() const;
- /// \brief Accumulate the constant address offset of this GEP if possible.
+ /// Accumulate the constant address offset of this GEP if possible.
///
/// This routine accepts an APInt into which it will accumulate the constant
/// offset of this GEP if the GEP is in fact constant. If the GEP is not
/// This instruction compares its operands according to the predicate given
/// to the constructor. It only operates on integers or pointers. The operands
/// must be identical types.
-/// \brief Represent an integer comparison operator.
+/// Represent an integer comparison operator.
class ICmpInst: public CmpInst {
void anchor() override;
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical ICmpInst
+ /// Clone an identical ICmpInst
ICmpInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics.
+ /// Constructor with insert-before-instruction semantics.
ICmpInst(
Instruction *InsertBefore, ///< Where to insert
Predicate pred, ///< The predicate to use for the comparison
#endif
}
- /// \brief Constructor with insert-at-end semantics.
+ /// Constructor with insert-at-end semantics.
ICmpInst(
BasicBlock &InsertAtEnd, ///< Block to insert into.
Predicate pred, ///< The predicate to use for the comparison
#endif
}
- /// \brief Constructor with no-insertion semantics
+ /// Constructor with no-insertion semantics
ICmpInst(
Predicate pred, ///< The predicate to use for the comparison
Value *LHS, ///< The left-hand-side of the expression
/// For example, EQ->EQ, SLE->SLE, UGT->SGT, etc.
/// @returns the predicate that would be the result if the operand were
/// regarded as signed.
- /// \brief Return the signed version of the predicate
+ /// Return the signed version of the predicate
Predicate getSignedPredicate() const {
return getSignedPredicate(getPredicate());
}
/// This is a static version that you can use without an instruction.
- /// \brief Return the signed version of the predicate.
+ /// Return the signed version of the predicate.
static Predicate getSignedPredicate(Predicate pred);
/// For example, EQ->EQ, SLE->ULE, UGT->UGT, etc.
/// @returns the predicate that would be the result if the operand were
/// regarded as unsigned.
- /// \brief Return the unsigned version of the predicate
+ /// Return the unsigned version of the predicate
Predicate getUnsignedPredicate() const {
return getUnsignedPredicate(getPredicate());
}
/// This is a static version that you can use without an instruction.
- /// \brief Return the unsigned version of the predicate.
+ /// Return the unsigned version of the predicate.
static Predicate getUnsignedPredicate(Predicate pred);
- /// isEquality - Return true if this predicate is either EQ or NE. This also
+ /// Return true if this predicate is either EQ or NE. This also
/// tests for commutativity.
static bool isEquality(Predicate P) {
return P == ICMP_EQ || P == ICMP_NE;
}
- /// isEquality - Return true if this predicate is either EQ or NE. This also
+ /// Return true if this predicate is either EQ or NE. This also
/// tests for commutativity.
bool isEquality() const {
return isEquality(getPredicate());
}
/// @returns true if the predicate of this ICmpInst is commutative
- /// \brief Determine if this relation is commutative.
+ /// Determine if this relation is commutative.
bool isCommutative() const { return isEquality(); }
- /// isRelational - Return true if the predicate is relational (not EQ or NE).
+ /// Return true if the predicate is relational (not EQ or NE).
///
bool isRelational() const {
return !isEquality();
}
- /// isRelational - Return true if the predicate is relational (not EQ or NE).
+ /// Return true if the predicate is relational (not EQ or NE).
///
static bool isRelational(Predicate P) {
return !isEquality(P);
}
/// Initialize a set of values that all satisfy the predicate with C.
- /// \brief Make a ConstantRange for a relation with a constant value.
+ /// Make a ConstantRange for a relation with a constant value.
static ConstantRange makeConstantRange(Predicate pred, const APInt &C);
/// Exchange the two operands to this instruction in such a way that it does
/// not modify the semantics of the instruction. The predicate value may be
/// changed to retain the same result if the predicate is order dependent
/// (e.g. ult).
- /// \brief Swap operands and adjust predicate.
+ /// Swap operands and adjust predicate.
void swapOperands() {
setPredicate(getSwappedPredicate());
Op<0>().swap(Op<1>());
/// This instruction compares its operands according to the predicate given
/// to the constructor. It only operates on floating point values or packed
/// vectors of floating point values. The operands must be identical types.
-/// \brief Represents a floating point comparison operator.
+/// Represents a floating point comparison operator.
class FCmpInst: public CmpInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical FCmpInst
+ /// Clone an identical FCmpInst
FCmpInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics.
+ /// Constructor with insert-before-instruction semantics.
FCmpInst(
Instruction *InsertBefore, ///< Where to insert
Predicate pred, ///< The predicate to use for the comparison
"Invalid operand types for FCmp instruction");
}
- /// \brief Constructor with insert-at-end semantics.
+ /// Constructor with insert-at-end semantics.
FCmpInst(
BasicBlock &InsertAtEnd, ///< Block to insert into.
Predicate pred, ///< The predicate to use for the comparison
"Invalid operand types for FCmp instruction");
}
- /// \brief Constructor with no-insertion semantics
+ /// Constructor with no-insertion semantics
FCmpInst(
Predicate pred, ///< The predicate to use for the comparison
Value *LHS, ///< The left-hand-side of the expression
}
/// @returns true if the predicate of this instruction is EQ or NE.
- /// \brief Determine if this is an equality predicate.
+ /// Determine if this is an equality predicate.
static bool isEquality(Predicate Pred) {
return Pred == FCMP_OEQ || Pred == FCMP_ONE || Pred == FCMP_UEQ ||
Pred == FCMP_UNE;
}
/// @returns true if the predicate of this instruction is EQ or NE.
- /// \brief Determine if this is an equality predicate.
+ /// Determine if this is an equality predicate.
bool isEquality() const { return isEquality(getPredicate()); }
/// @returns true if the predicate of this instruction is commutative.
- /// \brief Determine if this is a commutative predicate.
+ /// Determine if this is a commutative predicate.
bool isCommutative() const {
return isEquality() ||
getPredicate() == FCMP_FALSE ||
}
/// @returns true if the predicate is relational (not EQ or NE).
- /// \brief Determine if this a relational predicate.
+ /// Determine if this a relational predicate.
bool isRelational() const { return !isEquality(); }
/// Exchange the two operands to this instruction in such a way that it does
/// not modify the semantics of the instruction. The predicate value may be
/// changed to retain the same result if the predicate is order dependent
/// (e.g. ult).
- /// \brief Swap operands and adjust predicate.
+ /// Swap operands and adjust predicate.
void swapOperands() {
setPredicate(getSwappedPredicate());
Op<0>().swap(Op<1>());
}
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::FCmp;
}
};
//===----------------------------------------------------------------------===//
-/// CallInst - This class represents a function call, abstracting a target
+/// This class represents a function call, abstracting a target
/// machine's calling convention. This class uses low bit of the SubClassData
/// field to indicate whether or not this is a tail call. The rest of the bits
/// hold the calling convention of the call.
void init(Value *Func, const Twine &NameStr);
/// Construct a CallInst given a range of arguments.
- /// \brief Construct a CallInst from a range of arguments
+ /// Construct a CallInst from a range of arguments
inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr,
Instruction *InsertBefore);
: CallInst(Func, Args, None, NameStr, InsertBefore) {}
/// Construct a CallInst given a range of arguments.
- /// \brief Construct a CallInst from a range of arguments
+ /// Construct a CallInst from a range of arguments
inline CallInst(Value *Func, ArrayRef<Value *> Args,
ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr,
BasicBlock *InsertAtEnd);
return new(1) CallInst(F, NameStr, InsertAtEnd);
}
- /// \brief Create a clone of \p CI with a different set of operand bundles and
+ /// Create a clone of \p CI with a different set of operand bundles and
/// insert it before \p InsertPt.
///
/// The returned call instruction is identical \p CI in every way except that
static CallInst *Create(CallInst *CI, ArrayRef<OperandBundleDef> Bundles,
Instruction *InsertPt = nullptr);
- /// CreateMalloc - Generate the IR for a call to malloc:
+ /// Generate the IR for a call to malloc:
/// 1. Compute the malloc call's argument as the specified type's size,
/// possibly multiplied by the array size if the array size is not
/// constant 1.
ArrayRef<OperandBundleDef> Bundles = None,
Function* MallocF = nullptr,
const Twine &Name = "");
- /// CreateFree - Generate the IR for a call to the builtin free function.
+ /// Generate the IR for a call to the builtin free function.
static Instruction *CreateFree(Value *Source,
Instruction *InsertBefore);
static Instruction *CreateFree(Value *Source,
/// Provide fast operand accessors
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
- /// getNumArgOperands - Return the number of call arguments.
+ /// Return the number of call arguments.
///
unsigned getNumArgOperands() const {
return getNumOperands() - getNumTotalBundleOperands() - 1;
setOperand(i, v);
}
- /// \brief Return the iterator pointing to the beginning of the argument list.
+ /// Return the iterator pointing to the beginning of the argument list.
op_iterator arg_begin() { return op_begin(); }
- /// \brief Return the iterator pointing to the end of the argument list.
+ /// Return the iterator pointing to the end of the argument list.
op_iterator arg_end() {
// [ call args ], [ operand bundles ], callee
return op_end() - getNumTotalBundleOperands() - 1;
}
- /// \brief Iteration adapter for range-for loops.
+ /// Iteration adapter for range-for loops.
iterator_range<op_iterator> arg_operands() {
return make_range(arg_begin(), arg_end());
}
- /// \brief Return the iterator pointing to the beginning of the argument list.
+ /// Return the iterator pointing to the beginning of the argument list.
const_op_iterator arg_begin() const { return op_begin(); }
- /// \brief Return the iterator pointing to the end of the argument list.
+ /// Return the iterator pointing to the end of the argument list.
const_op_iterator arg_end() const {
// [ call args ], [ operand bundles ], callee
return op_end() - getNumTotalBundleOperands() - 1;
}
- /// \brief Iteration adapter for range-for loops.
+ /// Iteration adapter for range-for loops.
iterator_range<const_op_iterator> arg_operands() const {
return make_range(arg_begin(), arg_end());
}
- /// \brief Wrappers for getting the \c Use of a call argument.
+ /// Wrappers for getting the \c Use of a call argument.
const Use &getArgOperandUse(unsigned i) const {
assert(i < getNumArgOperands() && "Out of bounds!");
return getOperandUse(i);
(ID << 2));
}
- /// getAttributes - Return the parameter attributes for this call.
+ /// Return the parameter attributes for this call.
///
const AttributeSet &getAttributes() const { return AttributeList; }
- /// setAttributes - Set the parameter attributes for this call.
+ /// Set the parameter attributes for this call.
///
void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; }
- /// addAttribute - adds the attribute to the list of attributes.
+ /// adds the attribute to the list of attributes.
void addAttribute(unsigned i, Attribute::AttrKind Kind);
- /// addAttribute - adds the attribute to the list of attributes.
+ /// adds the attribute to the list of attributes.
void addAttribute(unsigned i, StringRef Kind, StringRef Value);
- /// addAttribute - adds the attribute to the list of attributes.
+ /// adds the attribute to the list of attributes.
void addAttribute(unsigned i, Attribute Attr);
- /// removeAttribute - removes the attribute from the list of attributes.
+ /// removes the attribute from the list of attributes.
void removeAttribute(unsigned i, Attribute::AttrKind Kind);
- /// removeAttribute - removes the attribute from the list of attributes.
+ /// removes the attribute from the list of attributes.
void removeAttribute(unsigned i, StringRef Kind);
- /// removeAttribute - removes the attribute from the list of attributes.
+ /// removes the attribute from the list of attributes.
void removeAttribute(unsigned i, Attribute Attr);
- /// \brief adds the dereferenceable attribute to the list of attributes.
+ /// adds the dereferenceable attribute to the list of attributes.
void addDereferenceableAttr(unsigned i, uint64_t Bytes);
- /// \brief adds the dereferenceable_or_null attribute to the list of
+ /// adds the dereferenceable_or_null attribute to the list of
/// attributes.
void addDereferenceableOrNullAttr(unsigned i, uint64_t Bytes);
- /// \brief Determine whether this call has the given attribute.
+ /// Determine whether this call has the given attribute.
bool hasFnAttr(Attribute::AttrKind Kind) const {
assert(Kind != Attribute::NoBuiltin &&
"Use CallInst::isNoBuiltin() to check for Attribute::NoBuiltin");
return hasFnAttrImpl(Kind);
}
- /// \brief Determine whether this call has the given attribute.
+ /// Determine whether this call has the given attribute.
bool hasFnAttr(StringRef Kind) const {
return hasFnAttrImpl(Kind);
}
- /// \brief Determine whether the call or the callee has the given attributes.
+ /// Determine whether the call or the callee has the given attributes.
bool paramHasAttr(unsigned i, Attribute::AttrKind Kind) const;
- /// \brief Get the attribute of a given kind at a position.
+ /// Get the attribute of a given kind at a position.
Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const;
- /// \brief Get the attribute of a given kind at a position.
+ /// Get the attribute of a given kind at a position.
Attribute getAttribute(unsigned i, StringRef Kind) const;
- /// \brief Return true if the data operand at index \p i has the attribute \p
+ /// Return true if the data operand at index \p i has the attribute \p
/// A.
///
/// Data operands include call arguments and values used in operand bundles,
/// (\p i - 1) in the operand list.
bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const;
- /// \brief Extract the alignment for a call or parameter (0=unknown).
+ /// Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
return AttributeList.getParamAlignment(i);
}
- /// \brief Extract the number of dereferenceable bytes for a call or
+ /// Extract the number of dereferenceable bytes for a call or
/// parameter (0=unknown).
uint64_t getDereferenceableBytes(unsigned i) const {
return AttributeList.getDereferenceableBytes(i);
}
- /// \brief Extract the number of dereferenceable_or_null bytes for a call or
+ /// Extract the number of dereferenceable_or_null bytes for a call or
/// parameter (0=unknown).
uint64_t getDereferenceableOrNullBytes(unsigned i) const {
return AttributeList.getDereferenceableOrNullBytes(i);
return AttributeList.hasAttribute(n, Attribute::NoAlias);
}
- /// \brief Return true if the call should not be treated as a call to a
+ /// Return true if the call should not be treated as a call to a
/// builtin.
bool isNoBuiltin() const {
return hasFnAttrImpl(Attribute::NoBuiltin) &&
!hasFnAttrImpl(Attribute::Builtin);
}
- /// \brief Return true if the call should not be inlined.
+ /// Return true if the call should not be inlined.
bool isNoInline() const { return hasFnAttr(Attribute::NoInline); }
void setIsNoInline() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoInline);
}
- /// \brief Return true if the call can return twice
+ /// Return true if the call can return twice
bool canReturnTwice() const {
return hasFnAttr(Attribute::ReturnsTwice);
}
addAttribute(AttributeSet::FunctionIndex, Attribute::ReturnsTwice);
}
- /// \brief Determine if the call does not access memory.
+ /// Determine if the call does not access memory.
bool doesNotAccessMemory() const {
return hasFnAttr(Attribute::ReadNone);
}
addAttribute(AttributeSet::FunctionIndex, Attribute::ReadNone);
}
- /// \brief Determine if the call does not access or only reads memory.
+ /// Determine if the call does not access or only reads memory.
bool onlyReadsMemory() const {
return doesNotAccessMemory() || hasFnAttr(Attribute::ReadOnly);
}
addAttribute(AttributeSet::FunctionIndex, Attribute::ReadOnly);
}
- /// \brief Determine if the call does not access or only writes memory.
+ /// Determine if the call does not access or only writes memory.
bool doesNotReadMemory() const {
return doesNotAccessMemory() || hasFnAttr(Attribute::WriteOnly);
}
addAttribute(AttributeSet::FunctionIndex, Attribute::ArgMemOnly);
}
- /// \brief Determine if the call cannot return.
+ /// Determine if the call cannot return.
bool doesNotReturn() const { return hasFnAttr(Attribute::NoReturn); }
void setDoesNotReturn() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoReturn);
}
- /// \brief Determine if the call cannot unwind.
+ /// Determine if the call cannot unwind.
bool doesNotThrow() const { return hasFnAttr(Attribute::NoUnwind); }
void setDoesNotThrow() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoUnwind);
}
- /// \brief Determine if the call cannot be duplicated.
+ /// Determine if the call cannot be duplicated.
bool cannotDuplicate() const {return hasFnAttr(Attribute::NoDuplicate); }
void setCannotDuplicate() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoDuplicate);
}
- /// \brief Determine if the call is convergent
+ /// Determine if the call is convergent
bool isConvergent() const { return hasFnAttr(Attribute::Convergent); }
void setConvergent() {
addAttribute(AttributeSet::FunctionIndex, Attribute::Convergent);
Attribute::get(getContext(), Attribute::Convergent));
}
- /// \brief Determine if the call returns a structure through first
+ /// Determine if the call returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
if (getNumArgOperands() == 0)
return paramHasAttr(1, Attribute::StructRet);
}
- /// \brief Determine if any call argument is an aggregate passed by value.
+ /// Determine if any call argument is an aggregate passed by value.
bool hasByValArgument() const {
return AttributeList.hasAttrSomewhere(Attribute::ByVal);
}
- /// getCalledFunction - Return the function called, or null if this is an
+ /// Return the function called, or null if this is an
/// indirect function invocation.
///
Function *getCalledFunction() const {
return dyn_cast<Function>(Op<-1>());
}
- /// getCalledValue - Get a pointer to the function that is invoked by this
+ /// Get a pointer to the function that is invoked by this
/// instruction.
const Value *getCalledValue() const { return Op<-1>(); }
Value *getCalledValue() { return Op<-1>(); }
- /// setCalledFunction - Set the function called.
+ /// Set the function called.
void setCalledFunction(Value* Fn) {
setCalledFunction(
cast<FunctionType>(cast<PointerType>(Fn->getType())->getElementType()),
Op<-1>() = Fn;
}
- /// isInlineAsm - Check if this call is an inline asm statement.
+ /// Check if this call is an inline asm statement.
bool isInlineAsm() const {
return isa<InlineAsm>(Op<-1>());
}
// SelectInst Class
//===----------------------------------------------------------------------===//
-/// SelectInst - This class represents the LLVM 'select' instruction.
+/// This class represents the LLVM 'select' instruction.
///
class SelectInst : public Instruction {
void init(Value *C, Value *S1, Value *S2) {
void setTrueValue(Value *V) { Op<1>() = V; }
void setFalseValue(Value *V) { Op<2>() = V; }
- /// areInvalidOperands - Return a string if the specified operands are invalid
+ /// Return a string if the specified operands are invalid
/// for a select operation, otherwise return null.
static const char *areInvalidOperands(Value *Cond, Value *True, Value *False);
// VAArgInst Class
//===----------------------------------------------------------------------===//
-/// VAArgInst - This class represents the va_arg llvm instruction, which returns
+/// This class represents the va_arg llvm instruction, which returns
/// an argument of the specified type given a va_list and increments that list
///
class VAArgInst : public UnaryInstruction {
// ExtractElementInst Class
//===----------------------------------------------------------------------===//
-/// ExtractElementInst - This instruction extracts a single (scalar)
+/// This instruction extracts a single (scalar)
/// element from a VectorType value
///
class ExtractElementInst : public Instruction {
return new(2) ExtractElementInst(Vec, Idx, NameStr, InsertAtEnd);
}
- /// isValidOperands - Return true if an extractelement instruction can be
+ /// Return true if an extractelement instruction can be
/// formed with the specified operands.
static bool isValidOperands(const Value *Vec, const Value *Idx);
// InsertElementInst Class
//===----------------------------------------------------------------------===//
-/// InsertElementInst - This instruction inserts a single (scalar)
+/// This instruction inserts a single (scalar)
/// element into a VectorType value
///
class InsertElementInst : public Instruction {
return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertAtEnd);
}
- /// isValidOperands - Return true if an insertelement instruction can be
+ /// Return true if an insertelement instruction can be
/// formed with the specified operands.
static bool isValidOperands(const Value *Vec, const Value *NewElt,
const Value *Idx);
- /// getType - Overload to return most specific vector type.
+ /// Overload to return most specific vector type.
///
VectorType *getType() const {
return cast<VectorType>(Instruction::getType());
// ShuffleVectorInst Class
//===----------------------------------------------------------------------===//
-/// ShuffleVectorInst - This instruction constructs a fixed permutation of two
+/// This instruction constructs a fixed permutation of two
/// input vectors.
///
class ShuffleVectorInst : public Instruction {
ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
const Twine &NameStr, BasicBlock *InsertAtEnd);
- /// isValidOperands - Return true if a shufflevector instruction can be
+ /// Return true if a shufflevector instruction can be
/// formed with the specified operands.
static bool isValidOperands(const Value *V1, const Value *V2,
const Value *Mask);
- /// getType - Overload to return most specific vector type.
+ /// Overload to return most specific vector type.
///
VectorType *getType() const {
return cast<VectorType>(Instruction::getType());
return cast<Constant>(getOperand(2));
}
- /// getMaskValue - Return the index from the shuffle mask for the specified
+ /// Return the index from the shuffle mask for the specified
/// output result. This is either -1 if the element is undef or a number less
/// than 2*numelements.
static int getMaskValue(Constant *Mask, unsigned i);
return getMaskValue(getMask(), i);
}
- /// getShuffleMask - Return the full mask for this instruction, where each
+ /// Return the full mask for this instruction, where each
/// element is the element number and undef's are returned as -1.
static void getShuffleMask(Constant *Mask, SmallVectorImpl<int> &Result);
// ExtractValueInst Class
//===----------------------------------------------------------------------===//
-/// ExtractValueInst - This instruction extracts a struct member or array
+/// This instruction extracts a struct member or array
/// element value from an aggregate value.
///
class ExtractValueInst : public UnaryInstruction {
return new ExtractValueInst(Agg, Idxs, NameStr, InsertAtEnd);
}
- /// getIndexedType - Returns the type of the element that would be extracted
+ /// Returns the type of the element that would be extracted
/// with an extractvalue instruction with the specified parameters.
///
/// Null is returned if the indices are invalid for the specified type.
// InsertValueInst Class
//===----------------------------------------------------------------------===//
-/// InsertValueInst - This instruction inserts a struct field of array element
+/// This instruction inserts a struct field of array element
/// value into an aggregate value.
///
class InsertValueInst : public Instruction {
void anchor() override;
void *operator new(size_t, unsigned) = delete;
- /// ReservedSpace - The number of operands actually allocated. NumOperands is
+ /// The number of operands actually allocated. NumOperands is
/// the number actually in use.
unsigned ReservedSpace;
PHINode(const PHINode &PN);
const_op_range incoming_values() const { return operands(); }
- /// getNumIncomingValues - Return the number of incoming edges
+ /// Return the number of incoming edges
///
unsigned getNumIncomingValues() const { return getNumOperands(); }
- /// getIncomingValue - Return incoming value number x
+ /// Return incoming value number x
///
Value *getIncomingValue(unsigned i) const {
return getOperand(i);
return i;
}
- /// getIncomingBlock - Return incoming basic block number @p i.
+ /// Return incoming basic block number @p i.
///
BasicBlock *getIncomingBlock(unsigned i) const {
return block_begin()[i];
}
- /// getIncomingBlock - Return incoming basic block corresponding
+ /// Return incoming basic block corresponding
/// to an operand of the PHI.
///
BasicBlock *getIncomingBlock(const Use &U) const {
return getIncomingBlock(unsigned(&U - op_begin()));
}
- /// getIncomingBlock - Return incoming basic block corresponding
+ /// Return incoming basic block corresponding
/// to value use iterator.
///
BasicBlock *getIncomingBlock(Value::const_user_iterator I) const {
block_begin()[i] = BB;
}
- /// addIncoming - Add an incoming value to the end of the PHI list
+ /// Add an incoming value to the end of the PHI list
///
void addIncoming(Value *V, BasicBlock *BB) {
if (getNumOperands() == ReservedSpace)
setIncomingBlock(getNumOperands() - 1, BB);
}
- /// removeIncomingValue - Remove an incoming value. This is useful if a
+ /// Remove an incoming value. This is useful if a
/// predecessor basic block is deleted. The value removed is returned.
///
/// If the last incoming value for a PHI node is removed (and DeletePHIIfEmpty
return removeIncomingValue(Idx, DeletePHIIfEmpty);
}
- /// getBasicBlockIndex - Return the first index of the specified basic
+ /// Return the first index of the specified basic
/// block in the value list for this PHI. Returns -1 if no instance.
///
int getBasicBlockIndex(const BasicBlock *BB) const {
return getIncomingValue(Idx);
}
- /// hasConstantValue - If the specified PHI node always merges together the
+ /// If the specified PHI node always merges together the
/// same value, return the value, otherwise return null.
Value *hasConstantValue() const;
- /// hasConstantOrUndefValue - Whether the specified PHI node always merges
+ /// Whether the specified PHI node always merges
/// together the same value, assuming undefs are equal to a unique
/// non-undef value.
bool hasConstantOrUndefValue() const;
//===----------------------------------------------------------------------===//
//===---------------------------------------------------------------------------
-/// LandingPadInst - The landingpad instruction holds all of the information
+/// The landingpad instruction holds all of the information
/// necessary to generate correct exception handling. The landingpad instruction
/// cannot be moved from the top of a landing pad block, which itself is
/// accessible only from the 'unwind' edge of an invoke. This uses the
/// cleanup.
///
class LandingPadInst : public Instruction {
- /// ReservedSpace - The number of operands actually allocated. NumOperands is
+ /// The number of operands actually allocated. NumOperands is
/// the number actually in use.
unsigned ReservedSpace;
LandingPadInst(const LandingPadInst &LP);
/// Provide fast operand accessors
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
- /// isCleanup - Return 'true' if this landingpad instruction is a
+ /// Return 'true' if this landingpad instruction is a
/// cleanup. I.e., it should be run when unwinding even if its landing pad
/// doesn't catch the exception.
bool isCleanup() const { return getSubclassDataFromInstruction() & 1; }
- /// setCleanup - Indicate that this landingpad instruction is a cleanup.
+ /// Indicate that this landingpad instruction is a cleanup.
void setCleanup(bool V) {
setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) |
(V ? 1 : 0));
return cast<Constant>(getOperandList()[Idx]);
}
- /// isCatch - Return 'true' if the clause and index Idx is a catch clause.
+ /// Return 'true' if the clause and index Idx is a catch clause.
bool isCatch(unsigned Idx) const {
return !isa<ArrayType>(getOperandList()[Idx]->getType());
}
- /// isFilter - Return 'true' if the clause and index Idx is a filter clause.
+ /// Return 'true' if the clause and index Idx is a filter clause.
bool isFilter(unsigned Idx) const {
return isa<ArrayType>(getOperandList()[Idx]->getType());
}
- /// getNumClauses - Get the number of clauses for this landing pad.
+ /// Get the number of clauses for this landing pad.
unsigned getNumClauses() const { return getNumOperands(); }
- /// reserveClauses - Grow the size of the operand list to accommodate the new
+ /// Grow the size of the operand list to accommodate the new
/// number of clauses.
void reserveClauses(unsigned Size) { growOperands(Size); }
//===----------------------------------------------------------------------===//
//===---------------------------------------------------------------------------
-/// ReturnInst - Return a value (possibly void), from a function. Execution
+/// Return a value (possibly void), from a function. Execution
/// does not continue in this function any longer.
///
class ReturnInst : public TerminatorInst {
//===----------------------------------------------------------------------===//
//===---------------------------------------------------------------------------
-/// BranchInst - Conditional or Unconditional Branch instruction.
+/// Conditional or Unconditional Branch instruction.
///
class BranchInst : public TerminatorInst {
/// Ops list - Branches are strange. The operands are ordered:
*(&Op<-1>() - idx) = NewSucc;
}
- /// \brief Swap the successors of this branch instruction.
+ /// Swap the successors of this branch instruction.
///
/// Swaps the successors of the branch instruction. This also swaps any
/// branch weight metadata associated with the instruction so that it
//===----------------------------------------------------------------------===//
//===---------------------------------------------------------------------------
-/// IndirectBrInst - Indirect Branch Instruction.
+/// Indirect Branch Instruction.
///
class IndirectBrInst : public TerminatorInst {
void *operator new(size_t, unsigned) = delete;
void *operator new(size_t s) {
return User::operator new(s);
}
- /// IndirectBrInst ctor - Create a new indirectbr instruction, specifying an
+ /// Create a new indirectbr instruction, specifying an
/// Address to jump to. The number of expected destinations can be specified
/// here to make memory allocation more efficient. This constructor can also
/// autoinsert before another instruction.
IndirectBrInst(Value *Address, unsigned NumDests, Instruction *InsertBefore);
- /// IndirectBrInst ctor - Create a new indirectbr instruction, specifying an
+ /// Create a new indirectbr instruction, specifying an
/// Address to jump to. The number of expected destinations can be specified
/// here to make memory allocation more efficient. This constructor also
/// autoinserts at the end of the specified BasicBlock.
const Value *getAddress() const { return getOperand(0); }
void setAddress(Value *V) { setOperand(0, V); }
- /// getNumDestinations - return the number of possible destinations in this
+ /// return the number of possible destinations in this
/// indirectbr instruction.
unsigned getNumDestinations() const { return getNumOperands()-1; }
- /// getDestination - Return the specified destination.
+ /// Return the specified destination.
BasicBlock *getDestination(unsigned i) { return getSuccessor(i); }
const BasicBlock *getDestination(unsigned i) const { return getSuccessor(i); }
- /// addDestination - Add a destination.
+ /// Add a destination.
///
void addDestination(BasicBlock *Dest);
- /// removeDestination - This method removes the specified successor from the
+ /// This method removes the specified successor from the
/// indirectbr instruction.
void removeDestination(unsigned i);
// InvokeInst Class
//===----------------------------------------------------------------------===//
-/// InvokeInst - Invoke instruction. The SubclassData field is used to hold the
+/// Invoke instruction. The SubclassData field is used to hold the
/// calling convention of the call.
///
class InvokeInst : public TerminatorInst,
/// Construct an InvokeInst given a range of arguments.
///
- /// \brief Construct an InvokeInst from a range of arguments
+ /// Construct an InvokeInst from a range of arguments
inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException,
ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles,
unsigned Values, const Twine &NameStr,
const Twine &NameStr, Instruction *InsertBefore);
/// Construct an InvokeInst given a range of arguments.
///
- /// \brief Construct an InvokeInst from a range of arguments
+ /// Construct an InvokeInst from a range of arguments
inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException,
ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles,
unsigned Values, const Twine &NameStr,
InsertAtEnd);
}
- /// \brief Create a clone of \p II with a different set of operand bundles and
+ /// Create a clone of \p II with a different set of operand bundles and
/// insert it before \p InsertPt.
///
/// The returned invoke instruction is identical to \p II in every way except
this->FTy = FTy;
}
- /// getNumArgOperands - Return the number of invoke arguments.
+ /// Return the number of invoke arguments.
///
unsigned getNumArgOperands() const {
return getNumOperands() - getNumTotalBundleOperands() - 3;
setOperand(i, v);
}
- /// \brief Return the iterator pointing to the beginning of the argument list.
+ /// Return the iterator pointing to the beginning of the argument list.
op_iterator arg_begin() { return op_begin(); }
- /// \brief Return the iterator pointing to the end of the argument list.
+ /// Return the iterator pointing to the end of the argument list.
op_iterator arg_end() {
// [ invoke args ], [ operand bundles ], normal dest, unwind dest, callee
return op_end() - getNumTotalBundleOperands() - 3;
}
- /// \brief Iteration adapter for range-for loops.
+ /// Iteration adapter for range-for loops.
iterator_range<op_iterator> arg_operands() {
return make_range(arg_begin(), arg_end());
}
- /// \brief Return the iterator pointing to the beginning of the argument list.
+ /// Return the iterator pointing to the beginning of the argument list.
const_op_iterator arg_begin() const { return op_begin(); }
- /// \brief Return the iterator pointing to the end of the argument list.
+ /// Return the iterator pointing to the end of the argument list.
const_op_iterator arg_end() const {
// [ invoke args ], [ operand bundles ], normal dest, unwind dest, callee
return op_end() - getNumTotalBundleOperands() - 3;
}
- /// \brief Iteration adapter for range-for loops.
+ /// Iteration adapter for range-for loops.
iterator_range<const_op_iterator> arg_operands() const {
return make_range(arg_begin(), arg_end());
}
- /// \brief Wrappers for getting the \c Use of a invoke argument.
+ /// Wrappers for getting the \c Use of a invoke argument.
const Use &getArgOperandUse(unsigned i) const {
assert(i < getNumArgOperands() && "Out of bounds!");
return getOperandUse(i);
setInstructionSubclassData(ID);
}
- /// getAttributes - Return the parameter attributes for this invoke.
+ /// Return the parameter attributes for this invoke.
///
const AttributeSet &getAttributes() const { return AttributeList; }
- /// setAttributes - Set the parameter attributes for this invoke.
+ /// Set the parameter attributes for this invoke.
///
void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; }
- /// addAttribute - adds the attribute to the list of attributes.
+ /// adds the attribute to the list of attributes.
void addAttribute(unsigned i, Attribute::AttrKind Kind);
- /// addAttribute - adds the attribute to the list of attributes.
+ /// adds the attribute to the list of attributes.
void addAttribute(unsigned i, Attribute Attr);
- /// removeAttribute - removes the attribute from the list of attributes.
+ /// removes the attribute from the list of attributes.
void removeAttribute(unsigned i, Attribute::AttrKind Kind);
- /// removeAttribute - removes the attribute from the list of attributes.
+ /// removes the attribute from the list of attributes.
void removeAttribute(unsigned i, StringRef Kind);
- /// removeAttribute - removes the attribute from the list of attributes.
+ /// removes the attribute from the list of attributes.
void removeAttribute(unsigned i, Attribute Attr);
- /// \brief adds the dereferenceable attribute to the list of attributes.
+ /// adds the dereferenceable attribute to the list of attributes.
void addDereferenceableAttr(unsigned i, uint64_t Bytes);
- /// \brief adds the dereferenceable_or_null attribute to the list of
+ /// adds the dereferenceable_or_null attribute to the list of
/// attributes.
void addDereferenceableOrNullAttr(unsigned i, uint64_t Bytes);
- /// \brief Determine whether this call has the given attribute.
+ /// Determine whether this call has the given attribute.
bool hasFnAttr(Attribute::AttrKind Kind) const {
assert(Kind != Attribute::NoBuiltin &&
"Use CallInst::isNoBuiltin() to check for Attribute::NoBuiltin");
return hasFnAttrImpl(Kind);
}
- /// \brief Determine whether this call has the given attribute.
+ /// Determine whether this call has the given attribute.
bool hasFnAttr(StringRef Kind) const {
return hasFnAttrImpl(Kind);
}
- /// \brief Determine whether the call or the callee has the given attributes.
+ /// Determine whether the call or the callee has the given attributes.
bool paramHasAttr(unsigned i, Attribute::AttrKind Kind) const;
- /// \brief Get the attribute of a given kind at a position.
+ /// Get the attribute of a given kind at a position.
Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const;
- /// \brief Get the attribute of a given kind at a position.
+ /// Get the attribute of a given kind at a position.
Attribute getAttribute(unsigned i, StringRef Kind) const;
- /// \brief Return true if the data operand at index \p i has the attribute \p
+ /// Return true if the data operand at index \p i has the attribute \p
/// A.
///
/// Data operands include invoke arguments and values used in operand bundles,
/// (\p i - 1) in the operand list.
bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const;
- /// \brief Extract the alignment for a call or parameter (0=unknown).
+ /// Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
return AttributeList.getParamAlignment(i);
}
- /// \brief Extract the number of dereferenceable bytes for a call or
+ /// Extract the number of dereferenceable bytes for a call or
/// parameter (0=unknown).
uint64_t getDereferenceableBytes(unsigned i) const {
return AttributeList.getDereferenceableBytes(i);
}
- /// \brief Extract the number of dereferenceable_or_null bytes for a call or
+ /// Extract the number of dereferenceable_or_null bytes for a call or
/// parameter (0=unknown).
uint64_t getDereferenceableOrNullBytes(unsigned i) const {
return AttributeList.getDereferenceableOrNullBytes(i);
return AttributeList.hasAttribute(n, Attribute::NoAlias);
}
- /// \brief Return true if the call should not be treated as a call to a
+ /// Return true if the call should not be treated as a call to a
/// builtin.
bool isNoBuiltin() const {
// We assert in hasFnAttr if one passes in Attribute::NoBuiltin, so we have
!hasFnAttrImpl(Attribute::Builtin);
}
- /// \brief Return true if the call should not be inlined.
+ /// Return true if the call should not be inlined.
bool isNoInline() const { return hasFnAttr(Attribute::NoInline); }
void setIsNoInline() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoInline);
}
- /// \brief Determine if the call does not access memory.
+ /// Determine if the call does not access memory.
bool doesNotAccessMemory() const {
return hasFnAttr(Attribute::ReadNone);
}
addAttribute(AttributeSet::FunctionIndex, Attribute::ReadNone);
}
- /// \brief Determine if the call does not access or only reads memory.
+ /// Determine if the call does not access or only reads memory.
bool onlyReadsMemory() const {
return doesNotAccessMemory() || hasFnAttr(Attribute::ReadOnly);
}
addAttribute(AttributeSet::FunctionIndex, Attribute::ReadOnly);
}
- /// \brief Determine if the call does not access or only writes memory.
+ /// Determine if the call does not access or only writes memory.
bool doesNotReadMemory() const {
return doesNotAccessMemory() || hasFnAttr(Attribute::WriteOnly);
}
addAttribute(AttributeSet::FunctionIndex, Attribute::ArgMemOnly);
}
- /// \brief Determine if the call cannot return.
+ /// Determine if the call cannot return.
bool doesNotReturn() const { return hasFnAttr(Attribute::NoReturn); }
void setDoesNotReturn() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoReturn);
}
- /// \brief Determine if the call cannot unwind.
+ /// Determine if the call cannot unwind.
bool doesNotThrow() const { return hasFnAttr(Attribute::NoUnwind); }
void setDoesNotThrow() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoUnwind);
}
- /// \brief Determine if the invoke cannot be duplicated.
+ /// Determine if the invoke cannot be duplicated.
bool cannotDuplicate() const {return hasFnAttr(Attribute::NoDuplicate); }
void setCannotDuplicate() {
addAttribute(AttributeSet::FunctionIndex, Attribute::NoDuplicate);
}
- /// \brief Determine if the invoke is convergent
+ /// Determine if the invoke is convergent
bool isConvergent() const { return hasFnAttr(Attribute::Convergent); }
void setConvergent() {
addAttribute(AttributeSet::FunctionIndex, Attribute::Convergent);
Attribute::get(getContext(), Attribute::Convergent));
}
- /// \brief Determine if the call returns a structure through first
+ /// Determine if the call returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
if (getNumArgOperands() == 0)
return paramHasAttr(1, Attribute::StructRet);
}
- /// \brief Determine if any call argument is an aggregate passed by value.
+ /// Determine if any call argument is an aggregate passed by value.
bool hasByValArgument() const {
return AttributeList.hasAttrSomewhere(Attribute::ByVal);
}
- /// getCalledFunction - Return the function called, or null if this is an
+ /// Return the function called, or null if this is an
/// indirect function invocation.
///
Function *getCalledFunction() const {
return dyn_cast<Function>(Op<-3>());
}
- /// getCalledValue - Get a pointer to the function that is invoked by this
+ /// Get a pointer to the function that is invoked by this
/// instruction
const Value *getCalledValue() const { return Op<-3>(); }
Value *getCalledValue() { return Op<-3>(); }
- /// setCalledFunction - Set the function called.
+ /// Set the function called.
void setCalledFunction(Value* Fn) {
setCalledFunction(
cast<FunctionType>(cast<PointerType>(Fn->getType())->getElementType()),
Op<-1>() = reinterpret_cast<Value*>(B);
}
- /// getLandingPadInst - Get the landingpad instruction from the landing pad
+ /// Get the landingpad instruction from the landing pad
/// block (the unwind destination).
LandingPadInst *getLandingPadInst() const;
//===----------------------------------------------------------------------===//
//===---------------------------------------------------------------------------
-/// ResumeInst - Resume the propagation of an exception.
+/// Resume the propagation of an exception.
///
class ResumeInst : public TerminatorInst {
ResumeInst(const ResumeInst &RI);
//===----------------------------------------------------------------------===//
class CatchSwitchInst : public TerminatorInst {
void *operator new(size_t, unsigned) = delete;
- /// ReservedSpace - The number of operands actually allocated. NumOperands is
+ /// The number of operands actually allocated. NumOperands is
/// the number actually in use.
unsigned ReservedSpace;
// Operand[0] = Outer scope
void growOperands(unsigned Size);
// allocate space for exactly zero operands
void *operator new(size_t s) { return User::operator new(s); }
- /// CatchSwitchInst ctor - Create a new switch instruction, specifying a
+ /// Create a new switch instruction, specifying a
/// default destination. The number of additional handlers can be specified
/// here to make memory allocation more efficient.
/// This constructor can also autoinsert before another instruction.
unsigned NumHandlers, const Twine &NameStr,
Instruction *InsertBefore);
- /// CatchSwitchInst ctor - Create a new switch instruction, specifying a
+ /// Create a new switch instruction, specifying a
/// default destination. The number of additional handlers can be specified
/// here to make memory allocation more efficient.
/// This constructor also autoinserts at the end of the specified BasicBlock.
setOperand(1, UnwindDest);
}
- /// getNumHandlers - return the number of 'handlers' in this catchswitch
+ /// return the number of 'handlers' in this catchswitch
/// instruction, except the default handler
unsigned getNumHandlers() const {
if (hasUnwindDest())
return const_handler_iterator(op_end(), ConstDerefFnTy(handler_helper));
}
- /// handlers - iteration adapter for range-for loops.
+ /// iteration adapter for range-for loops.
handler_range handlers() {
return make_range(handler_begin(), handler_end());
}
- /// handlers - iteration adapter for range-for loops.
+ /// iteration adapter for range-for loops.
const_handler_range handlers() const {
return make_range(handler_begin(), handler_end());
}
- /// addHandler - Add an entry to the switch instruction...
+ /// Add an entry to the switch instruction...
/// Note:
/// This action invalidates handler_end(). Old handler_end() iterator will
/// point to the added handler.
CleanupPadInst(ParentPad, Args, Values, NameStr, InsertAtEnd);
}
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::CleanupPad;
}
Op<-1>() = CatchSwitch;
}
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::CatchPad;
}
//===----------------------------------------------------------------------===//
//===---------------------------------------------------------------------------
-/// UnreachableInst - This function has undefined behavior. In particular, the
+/// This function has undefined behavior. In particular, the
/// presence of this instruction indicates some higher level knowledge that the
/// end of the block cannot be reached.
///
// TruncInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a truncation of integer types.
+/// This class represents a truncation of integer types.
class TruncInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical TruncInst
+ /// Clone an identical TruncInst
TruncInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
TruncInst(
Value *S, ///< The value to be truncated
Type *Ty, ///< The (smaller) type to truncate to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
TruncInst(
Value *S, ///< The value to be truncated
Type *Ty, ///< The (smaller) type to truncate to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Trunc;
}
// ZExtInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents zero extension of integer types.
+/// This class represents zero extension of integer types.
class ZExtInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical ZExtInst
+ /// Clone an identical ZExtInst
ZExtInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
ZExtInst(
Value *S, ///< The value to be zero extended
Type *Ty, ///< The type to zero extend to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end semantics.
+ /// Constructor with insert-at-end semantics.
ZExtInst(
Value *S, ///< The value to be zero extended
Type *Ty, ///< The type to zero extend to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == ZExt;
}
// SExtInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a sign extension of integer types.
+/// This class represents a sign extension of integer types.
class SExtInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical SExtInst
+ /// Clone an identical SExtInst
SExtInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
SExtInst(
Value *S, ///< The value to be sign extended
Type *Ty, ///< The type to sign extend to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
SExtInst(
Value *S, ///< The value to be sign extended
Type *Ty, ///< The type to sign extend to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == SExt;
}
// FPTruncInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a truncation of floating point types.
+/// This class represents a truncation of floating point types.
class FPTruncInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical FPTruncInst
+ /// Clone an identical FPTruncInst
FPTruncInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
FPTruncInst(
Value *S, ///< The value to be truncated
Type *Ty, ///< The type to truncate to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
FPTruncInst(
Value *S, ///< The value to be truncated
Type *Ty, ///< The type to truncate to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == FPTrunc;
}
// FPExtInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents an extension of floating point types.
+/// This class represents an extension of floating point types.
class FPExtInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical FPExtInst
+ /// Clone an identical FPExtInst
FPExtInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
FPExtInst(
Value *S, ///< The value to be extended
Type *Ty, ///< The type to extend to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
FPExtInst(
Value *S, ///< The value to be extended
Type *Ty, ///< The type to extend to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == FPExt;
}
// UIToFPInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a cast unsigned integer to floating point.
+/// This class represents a cast unsigned integer to floating point.
class UIToFPInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical UIToFPInst
+ /// Clone an identical UIToFPInst
UIToFPInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
UIToFPInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
UIToFPInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == UIToFP;
}
// SIToFPInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a cast from signed integer to floating point.
+/// This class represents a cast from signed integer to floating point.
class SIToFPInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical SIToFPInst
+ /// Clone an identical SIToFPInst
SIToFPInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
SIToFPInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
SIToFPInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == SIToFP;
}
// FPToUIInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a cast from floating point to unsigned integer
+/// This class represents a cast from floating point to unsigned integer
class FPToUIInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical FPToUIInst
+ /// Clone an identical FPToUIInst
FPToUIInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
FPToUIInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
FPToUIInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
BasicBlock *InsertAtEnd ///< Where to insert the new instruction
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == FPToUI;
}
// FPToSIInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a cast from floating point to signed integer.
+/// This class represents a cast from floating point to signed integer.
class FPToSIInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical FPToSIInst
+ /// Clone an identical FPToSIInst
FPToSIInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
FPToSIInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
FPToSIInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Methods for support type inquiry through isa, cast, and dyn_cast:
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == FPToSI;
}
// IntToPtrInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a cast from an integer to a pointer.
+/// This class represents a cast from an integer to a pointer.
class IntToPtrInst : public CastInst {
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
IntToPtrInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
IntToPtrInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical IntToPtrInst
+ /// Clone an identical IntToPtrInst.
IntToPtrInst *cloneImpl() const;
- /// \brief Returns the address space of this instruction's pointer type.
+ /// Returns the address space of this instruction's pointer type.
unsigned getAddressSpace() const {
return getType()->getPointerAddressSpace();
}
// PtrToIntInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a cast from a pointer to an integer
+/// This class represents a cast from a pointer to an integer.
class PtrToIntInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical PtrToIntInst
+ /// Clone an identical PtrToIntInst.
PtrToIntInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
PtrToIntInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
PtrToIntInst(
Value *S, ///< The value to be converted
Type *Ty, ///< The type to convert to
BasicBlock *InsertAtEnd ///< The block to insert the instruction into
);
- /// \brief Gets the pointer operand.
+ /// Gets the pointer operand.
Value *getPointerOperand() { return getOperand(0); }
- /// \brief Gets the pointer operand.
+ /// Gets the pointer operand.
const Value *getPointerOperand() const { return getOperand(0); }
- /// \brief Gets the operand index of the pointer operand.
+ /// Gets the operand index of the pointer operand.
static unsigned getPointerOperandIndex() { return 0U; }
- /// \brief Returns the address space of the pointer operand.
+ /// Returns the address space of the pointer operand.
unsigned getPointerAddressSpace() const {
return getPointerOperand()->getType()->getPointerAddressSpace();
}
// BitCastInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a no-op cast from one type to another.
+/// This class represents a no-op cast from one type to another.
class BitCastInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical BitCastInst
+ /// Clone an identical BitCastInst.
BitCastInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
BitCastInst(
Value *S, ///< The value to be casted
Type *Ty, ///< The type to casted to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
BitCastInst(
Value *S, ///< The value to be casted
Type *Ty, ///< The type to casted to
// AddrSpaceCastInst Class
//===----------------------------------------------------------------------===//
-/// \brief This class represents a conversion between pointers from
-/// one address space to another.
+/// This class represents a conversion between pointers from one address space
+/// to another.
class AddrSpaceCastInst : public CastInst {
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
- /// \brief Clone an identical AddrSpaceCastInst
+ /// Clone an identical AddrSpaceCastInst.
AddrSpaceCastInst *cloneImpl() const;
public:
- /// \brief Constructor with insert-before-instruction semantics
+ /// Constructor with insert-before-instruction semantics
AddrSpaceCastInst(
Value *S, ///< The value to be casted
Type *Ty, ///< The type to casted to
Instruction *InsertBefore = nullptr ///< Where to insert the new instruction
);
- /// \brief Constructor with insert-at-end-of-block semantics
+ /// Constructor with insert-at-end-of-block semantics
AddrSpaceCastInst(
Value *S, ///< The value to be casted
Type *Ty, ///< The type to casted to
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
- /// \brief Gets the pointer operand.
+ /// Gets the pointer operand.
Value *getPointerOperand() {
return getOperand(0);
}
- /// \brief Gets the pointer operand.
+ /// Gets the pointer operand.
const Value *getPointerOperand() const {
return getOperand(0);
}
- /// \brief Gets the operand index of the pointer operand.
+ /// Gets the operand index of the pointer operand.
static unsigned getPointerOperandIndex() {
return 0U;
}
- /// \brief Returns the address space of the pointer operand.
+ /// Returns the address space of the pointer operand.
unsigned getSrcAddressSpace() const {
return getPointerOperand()->getType()->getPointerAddressSpace();
}
- /// \brief Returns the address space of the result.
+ /// Returns the address space of the result.
unsigned getDestAddressSpace() const {
return getType()->getPointerAddressSpace();
}