LLVM API Documentation
#include <Instructions.h>
Inheritance diagram for llvm::GetElementPtrInst:
Public Member Functions | |
GetElementPtrInst (Value *Ptr, const std::vector< Value * > &Idx, const std::string &Name="", Instruction *InsertBefore=0) | |
GetElementPtrInst (Value *Ptr, const std::vector< Value * > &Idx, const std::string &Name, BasicBlock *InsertAtEnd) | |
GetElementPtrInst (Value *Ptr, Value *Idx0, Value *Idx1, const std::string &Name="", Instruction *InsertBefore=0) | |
GetElementPtrInst (Value *Ptr, Value *Idx0, Value *Idx1, const std::string &Name, BasicBlock *InsertAtEnd) | |
virtual GetElementPtrInst * | clone () const |
const PointerType * | getType () 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 |
unsigned | getNumIndices () const |
bool | hasIndices () const |
Static Public Member Functions | |
static const Type * | getIndexedType (const Type *Ptr, const std::vector< Value * > &Indices, bool AllowStructLeaf=false) |
static const Type * | getIndexedType (const Type *Ptr, Value *Idx0, Value *Idx1, bool AllowStructLeaf=false) |
static unsigned | getPointerOperandIndex () |
static bool | classof (const GetElementPtrInst *) |
static bool | classof (const Instruction *I) |
Methods for support type inquiry through isa, cast, and dyn_cast:. | |
static bool | classof (const Value *V) |
Definition at line 273 of file Instructions.h.
|
Constructors - Create a getelementptr instruction with a base pointer an list of indices. The first ctor can optionally insert before an existing instruction, the second appends the new instruction to the specified BasicBlock. Definition at line 443 of file Instructions.cpp. References llvm::cl::init(). |
|
Definition at line 451 of file Instructions.cpp. References llvm::cl::init(). |
|
Constructors - These two constructors are convenience methods because two index getelementptr instructions are so common. Definition at line 459 of file Instructions.cpp. References llvm::cl::init(). |
|
Definition at line 467 of file Instructions.cpp. References llvm::cl::init(). |
|
Reimplemented from llvm::Instruction. Definition at line 347 of file Instructions.h. References classof(). |
|
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::Instruction. Definition at line 344 of file Instructions.h. References llvm::Instruction::getOpcode(). |
|
Definition at line 343 of file Instructions.h. Referenced by classof(). |
|
clone() - Create a copy of 'this' instruction that is identical in all ways except the following: The instruction has no parent The instruction has no name Implements llvm::Instruction. Definition at line 797 of file Instructions.cpp. |
|
Definition at line 518 of file Instructions.cpp. References llvm::SequentialType::getElementType(), llvm::CompositeType::getTypeAtIndex(), llvm::CompositeType::indexValid(), llvm::SequentialType::indexValid(), and llvm::Type::isFirstClassType(). |
|
getIndexedType - Returns the type of the element that would be loaded with a load instruction with the specified parameters. A null type is returned if the indices are invalid for the specified pointer type. Definition at line 481 of file Instructions.cpp. Referenced by llvm::ConstantFoldGetElementPtr(), llvm::ConvertExpressionToType(), llvm::ExpressionConvertibleToType(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getGetElementPtrTy(), and llvm::BytecodeReader::ParseInstruction(). |
|
Definition at line 334 of file Instructions.h. References llvm::User::getNumOperands(). Referenced by llvm::DecomposeArrayRef(). |
|
Definition at line 327 of file Instructions.h. References llvm::User::getOperand(). |
|
Definition at line 324 of file Instructions.h. References llvm::User::getOperand(). Referenced by llvm::ConvertExpressionToType(), llvm::DecomposeArrayRef(), llvm::ExpressionConvertibleToType(), and llvm::Interpreter::visitGetElementPtrInst(). |
|
Definition at line 330 of file Instructions.h. References U. |
|
All values are typed, get the type of this value. Reimplemented from llvm::Value. Definition at line 303 of file Instructions.h. References llvm::Value::getType(). Referenced by llvm::ConvertExpressionToType(), llvm::ExpressionConvertibleToType(), and PeepholeOptimizeAddCast(). |
|
Definition at line 338 of file Instructions.h. References llvm::User::getNumOperands(). |
|
Definition at line 320 of file Instructions.h. References llvm::User::op_begin(). |
|
Definition at line 319 of file Instructions.h. References llvm::User::op_begin(). Referenced by llvm::ConvertExpressionToType(), ConvertOperandToType(), llvm::DecomposeArrayRef(), and llvm::ExpressionConvertibleToType(). |
|
Definition at line 322 of file Instructions.h. References llvm::User::op_end(). |
|
Definition at line 321 of file Instructions.h. References llvm::User::op_end(). Referenced by llvm::ConvertExpressionToType(), ConvertOperandToType(), llvm::DecomposeArrayRef(), and llvm::ExpressionConvertibleToType(). |