LLVM API Documentation
#include <Operator.h>
Public Member Functions | |
bool | isInBounds () const |
op_iterator | idx_begin () |
const_op_iterator | idx_begin () const |
op_iterator | idx_end () |
const_op_iterator | idx_end () const |
Value * | getPointerOperand () |
const Value * | getPointerOperand () const |
Type * | getPointerOperandType () const |
unsigned | getPointerAddressSpace () const |
unsigned | getNumIndices () const |
bool | hasIndices () const |
bool | hasAllZeroIndices () const |
bool | hasAllConstantIndices () const |
bool | accumulateConstantOffset (const DataLayout &DL, APInt &Offset) const |
Accumulate the constant address offset of this GEP if possible. | |
Static Public Member Functions | |
static unsigned | getPointerOperandIndex () |
Friends | |
class | GetElementPtrInst |
class | ConstantExpr |
Definition at line 368 of file Operator.h.
bool llvm::GEPOperator::accumulateConstantOffset | ( | const DataLayout & | DL, |
APInt & | Offset | ||
) | const [inline] |
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.
Definition at line 455 of file Operator.h.
References llvm::dyn_cast(), llvm::gep_type_begin(), llvm::gep_type_end(), llvm::APInt::getBitWidth(), llvm::StructLayout::getElementOffset(), llvm::DataLayout::getPointerSizeInBits(), llvm::DataLayout::getStructLayout(), llvm::DataLayout::getTypeAllocSize(), llvm::ConstantInt::getValue(), llvm::ConstantInt::getZExtValue(), llvm::ConstantInt::isZero(), and llvm::APInt::sextOrTrunc().
Referenced by IsConstantOffsetFromGlobal(), and llvm::ObjectSizeOffsetVisitor::visitGEPOperator().
unsigned llvm::GEPOperator::getNumIndices | ( | ) | const [inline] |
Definition at line 415 of file Operator.h.
References llvm::User::getNumOperands().
unsigned llvm::GEPOperator::getPointerAddressSpace | ( | ) | const [inline] |
getPointerAddressSpace - Method to return the address space of the pointer operand.
Definition at line 411 of file Operator.h.
Referenced by DecomposeGEPExpression(), and isGEPKnownNonNull().
Value* llvm::GEPOperator::getPointerOperand | ( | ) | [inline] |
Definition at line 393 of file Operator.h.
References llvm::User::getOperand().
Referenced by llvm::DependenceAnalysis::depends(), llvm::DependenceAnalysis::getSplitIteration(), isGEPKnownNonNull(), llvm::ObjectSizeOffsetVisitor::visitGEPOperator(), and llvm::ObjectSizeOffsetEvaluator::visitGEPOperator().
const Value* llvm::GEPOperator::getPointerOperand | ( | ) | const [inline] |
Definition at line 396 of file Operator.h.
References llvm::User::getOperand().
static unsigned llvm::GEPOperator::getPointerOperandIndex | ( | ) | [inline, static] |
Definition at line 399 of file Operator.h.
Type* llvm::GEPOperator::getPointerOperandType | ( | ) | const [inline] |
getPointerOperandType - Method to return the pointer operand as a PointerType.
Definition at line 405 of file Operator.h.
References getPointerOperand().
Referenced by llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
bool llvm::GEPOperator::hasAllConstantIndices | ( | ) | const [inline] |
hasAllConstantIndices - 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.
Definition at line 439 of file Operator.h.
References I.
Referenced by llvm::InstCombiner::FoldGEPICmp().
bool llvm::GEPOperator::hasAllZeroIndices | ( | ) | const [inline] |
hasAllZeroIndices - 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.
Definition at line 426 of file Operator.h.
References llvm::CallingConv::C, and I.
Referenced by DecomposeGEPExpression(), evaluateICmpRelation(), llvm::InstCombiner::FoldGEPICmp(), and shouldMergeGEPs().
bool llvm::GEPOperator::hasIndices | ( | ) | const [inline] |
Definition at line 419 of file Operator.h.
References llvm::User::getNumOperands().
op_iterator llvm::GEPOperator::idx_begin | ( | ) | [inline] |
Definition at line 388 of file Operator.h.
References llvm::User::op_begin().
Referenced by llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
const_op_iterator llvm::GEPOperator::idx_begin | ( | ) | const [inline] |
Definition at line 389 of file Operator.h.
References llvm::User::op_begin().
op_iterator llvm::GEPOperator::idx_end | ( | ) | [inline] |
Definition at line 390 of file Operator.h.
References llvm::User::op_end().
Referenced by llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
const_op_iterator llvm::GEPOperator::idx_end | ( | ) | const [inline] |
Definition at line 391 of file Operator.h.
References llvm::User::op_end().
bool llvm::GEPOperator::isInBounds | ( | ) | const [inline] |
isInBounds - Test whether this is an inbounds GEP, as defined by LangRef.html.
Definition at line 384 of file Operator.h.
References llvm::Value::SubclassOptionalData.
Referenced by llvm::EmitGEPOffset(), llvm::InstCombiner::FoldGEPICmp(), and isGEPKnownNonNull().
friend class ConstantExpr [friend] |
Definition at line 375 of file Operator.h.
friend class GetElementPtrInst [friend] |
Definition at line 374 of file Operator.h.