class GEPOperator
Declaration
class GEPOperator { /* full declaration omitted */ };
Declared at: llvm/include/llvm/IR/Operator.h:454
Method Overview
- public bool accumulateConstantOffset(const llvm::DataLayout & DL, llvm::APInt & Offset) const
- public unsigned int countNonConstantIndices() const
- public Optional<unsigned int> getInRangeIndex() const
- public unsigned int getNumIndices() const
- public unsigned int getPointerAddressSpace() const
- public llvm::Value * getPointerOperand()
- public const llvm::Value * getPointerOperand() const
- public static unsigned int getPointerOperandIndex()
- public llvm::Type * getPointerOperandType() const
- public llvm::Type * getResultElementType() const
- public llvm::Type * getSourceElementType() const
- public bool hasAllConstantIndices() const
- public bool hasAllZeroIndices() const
- public bool hasIndices() const
- public inline int idx_begin() const
- public inline int idx_begin()
- public inline int idx_end()
- public inline int idx_end() const
- public bool isInBounds() const
Methods
¶bool accumulateConstantOffset(
const llvm::DataLayout& DL,
llvm::APInt& Offset) const
bool accumulateConstantOffset(
const llvm::DataLayout& DL,
llvm::APInt& Offset) const
Description
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 all-constant, it returns false and the value of the offset APInt is undefined (it is *not* preserved!). The APInt passed into this routine must be at exactly as wide as the IntPtr type for the address space of the base GEP pointer.
Declared at: llvm/include/llvm/IR/Operator.h:556
Parameters
- const llvm::DataLayout& DL
- llvm::APInt& Offset
¶unsigned int countNonConstantIndices() const
unsigned int countNonConstantIndices() const
Declared at: llvm/include/llvm/IR/Operator.h:542
¶Optional<unsigned int> getInRangeIndex() const
Optional<unsigned int> getInRangeIndex() const
Description
Returns the offset of the index with an inrange attachment, or None if none.
Declared at: llvm/include/llvm/IR/Operator.h:477
¶unsigned int getNumIndices() const
unsigned int getNumIndices() const
Declared at: llvm/include/llvm/IR/Operator.h:510
¶unsigned int getPointerAddressSpace() const
unsigned int getPointerAddressSpace() const
Description
Method to return the address space of the pointer operand.
Declared at: llvm/include/llvm/IR/Operator.h:506
¶llvm::Value* getPointerOperand()
llvm::Value* getPointerOperand()
Declared at: llvm/include/llvm/IR/Operator.h:487
¶const llvm::Value* getPointerOperand() const
const llvm::Value* getPointerOperand() const
Declared at: llvm/include/llvm/IR/Operator.h:490
¶static unsigned int getPointerOperandIndex()
static unsigned int getPointerOperandIndex()
Declared at: llvm/include/llvm/IR/Operator.h:493
¶llvm::Type* getPointerOperandType() const
llvm::Type* getPointerOperandType() const
Description
Method to return the pointer operand as a PointerType.
Declared at: llvm/include/llvm/IR/Operator.h:498
¶llvm::Type* getResultElementType() const
llvm::Type* getResultElementType() const
Declared at: llvm/include/llvm/IR/Operator.h:503
¶llvm::Type* getSourceElementType() const
llvm::Type* getSourceElementType() const
Declared at: llvm/include/llvm/IR/Operator.h:502
¶bool hasAllConstantIndices() const
bool hasAllConstantIndices() const
Description
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.
Declared at: llvm/include/llvm/IR/Operator.h:534
¶bool hasAllZeroIndices() const
bool hasAllZeroIndices() const
Description
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.
Declared at: llvm/include/llvm/IR/Operator.h:521
¶bool hasIndices() const
bool hasIndices() const
Declared at: llvm/include/llvm/IR/Operator.h:514
¶inline int idx_begin() const
inline int idx_begin() const
Declared at: llvm/include/llvm/IR/Operator.h:483
¶inline int idx_begin()
inline int idx_begin()
Declared at: llvm/include/llvm/IR/Operator.h:482
¶inline int idx_end()
inline int idx_end()
Declared at: llvm/include/llvm/IR/Operator.h:484
¶inline int idx_end() const
inline int idx_end() const
Declared at: llvm/include/llvm/IR/Operator.h:485
¶bool isInBounds() const
bool isInBounds() const
Description
Test whether this is an inbounds GEP, as defined by LangRef.html.
Declared at: llvm/include/llvm/IR/Operator.h:471