class GEPOperator

Declaration

class GEPOperator { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/Operator.h:454

Method Overview

Methods

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

Declared at: llvm/include/llvm/IR/Operator.h:542

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

Declared at: llvm/include/llvm/IR/Operator.h:510

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()

Declared at: llvm/include/llvm/IR/Operator.h:487

const llvm::Value* getPointerOperand() const

Declared at: llvm/include/llvm/IR/Operator.h:490

static unsigned int getPointerOperandIndex()

Declared at: llvm/include/llvm/IR/Operator.h:493

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

Declared at: llvm/include/llvm/IR/Operator.h:503

llvm::Type* getSourceElementType() const

Declared at: llvm/include/llvm/IR/Operator.h:502

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

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

Declared at: llvm/include/llvm/IR/Operator.h:514

inline int idx_begin() const

Declared at: llvm/include/llvm/IR/Operator.h:483

inline int idx_begin()

Declared at: llvm/include/llvm/IR/Operator.h:482

inline int idx_end()

Declared at: llvm/include/llvm/IR/Operator.h:484

inline int idx_end() const

Declared at: llvm/include/llvm/IR/Operator.h:485

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