LLVM API Documentation
#include <Instructions.h>
Public Member Functions | |
| virtual GetElementPtrInst * | clone () const |
| DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
| Transparently provide more efficient getOperand methods. | |
| 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 |
| const PointerType * | getPointerOperandType () const |
| unsigned | getNumIndices () const |
| bool | hasIndices () const |
| bool | hasAllZeroIndices () const |
| bool | hasAllConstantIndices () const |
Static Public Member Functions | |
| template<typename InputIterator> | |
| static GetElementPtrInst * | Create (Value *Ptr, InputIterator IdxBegin, InputIterator IdxEnd, const std::string &NameStr="", Instruction *InsertBefore=0) |
| template<typename InputIterator> | |
| static GetElementPtrInst * | Create (Value *Ptr, InputIterator IdxBegin, InputIterator IdxEnd, const std::string &NameStr, BasicBlock *InsertAtEnd) |
| static GetElementPtrInst * | Create (Value *Ptr, Value *Idx, const std::string &NameStr="", Instruction *InsertBefore=0) |
| static GetElementPtrInst * | Create (Value *Ptr, Value *Idx, const std::string &NameStr, BasicBlock *InsertAtEnd) |
| template<typename InputIterator> | |
| static const Type * | getIndexedType (const Type *Ptr, InputIterator IdxBegin, InputIterator IdxEnd) |
| static const Type * | getIndexedType (const Type *Ptr, Value *const *Idx, unsigned NumIdx) |
| static const Type * | getIndexedType (const Type *Ptr, uint64_t const *Idx, unsigned NumIdx) |
| static const Type * | getIndexedType (const Type *Ptr, Value *Idx) |
| 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 383 of file Instructions.h.
| static GetElementPtrInst* llvm::GetElementPtrInst::Create | ( | Value * | Ptr, | |
| InputIterator | IdxBegin, | |||
| InputIterator | IdxEnd, | |||
| const std::string & | NameStr = "", |
|||
| Instruction * | InsertBefore = 0 | |||
| ) | [inline, static] |
Definition at line 454 of file Instructions.h.
Referenced by llvm::IRBuilder< preserveNames, T >::CreateGEP(), llvm::NoFolder::CreateGetElementPtr(), llvm::IRBuilder< preserveNames, T >::CreateStructGEP(), OptimizeGlobalAddressOfMalloc(), RewriteHeapSROALoadUser(), and SRAGlobal().
| static GetElementPtrInst* llvm::GetElementPtrInst::Create | ( | Value * | Ptr, | |
| InputIterator | IdxBegin, | |||
| InputIterator | IdxEnd, | |||
| const std::string & | NameStr, | |||
| BasicBlock * | InsertAtEnd | |||
| ) | [inline, static] |
Definition at line 464 of file Instructions.h.
| static GetElementPtrInst* llvm::GetElementPtrInst::Create | ( | Value * | Ptr, | |
| Value * | Idx, | |||
| const std::string & | NameStr = "", |
|||
| Instruction * | InsertBefore = 0 | |||
| ) | [inline, static] |
Constructors - These two creators are convenience methods because one index getelementptr instructions are so common.
Definition at line 476 of file Instructions.h.
| static GetElementPtrInst* llvm::GetElementPtrInst::Create | ( | Value * | Ptr, | |
| Value * | Idx, | |||
| const std::string & | NameStr, | |||
| BasicBlock * | InsertAtEnd | |||
| ) | [inline, static] |
Definition at line 481 of file Instructions.h.
| GetElementPtrInst * GetElementPtrInst::clone | ( | ) | const [virtual] |
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 2855 of file Instructions.cpp.
References llvm::User::getNumOperands().
| llvm::GetElementPtrInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Transparently provide more efficient getOperand methods.
| const PointerType* llvm::GetElementPtrInst::getType | ( | ) | const [inline] |
All values are typed, get the type of this value.
Reimplemented from llvm::Value.
Definition at line 493 of file Instructions.h.
References llvm::Intrinsic::getType().
| static const Type* llvm::GetElementPtrInst::getIndexedType | ( | const Type * | Ptr, | |
| InputIterator | IdxBegin, | |||
| InputIterator | IdxEnd | |||
| ) | [inline, static] |
getIndexedType - 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 pointer type.
Definition at line 504 of file Instructions.h.
Definition at line 1091 of file Instructions.cpp.
References llvm::dyn_cast(), llvm::SequentialType::getElementType(), and llvm::SequentialType::indexValid().
| op_iterator llvm::GetElementPtrInst::idx_begin | ( | ) | [inline] |
| const_op_iterator llvm::GetElementPtrInst::idx_begin | ( | ) | const [inline] |
| op_iterator llvm::GetElementPtrInst::idx_end | ( | ) | [inline] |
| const_op_iterator llvm::GetElementPtrInst::idx_end | ( | ) | const [inline] |
| Value* llvm::GetElementPtrInst::getPointerOperand | ( | ) | [inline] |
Definition at line 525 of file Instructions.h.
References llvm::User::getOperand().
Referenced by getPointerOperandType(), and llvm::Interpreter::visitGetElementPtrInst().
| const Value* llvm::GetElementPtrInst::getPointerOperand | ( | ) | const [inline] |
| static unsigned llvm::GetElementPtrInst::getPointerOperandIndex | ( | ) | [inline, static] |
Definition at line 531 of file Instructions.h.
| const PointerType* llvm::GetElementPtrInst::getPointerOperandType | ( | ) | const [inline] |
getPointerOperandType - Method to return the pointer operand as a PointerType.
Definition at line 537 of file Instructions.h.
References getPointerOperand(), and llvm::Value::getType().
| unsigned llvm::GetElementPtrInst::getNumIndices | ( | ) | const [inline] |
| bool llvm::GetElementPtrInst::hasIndices | ( | ) | const [inline] |
| bool GetElementPtrInst::hasAllZeroIndices | ( | ) | const |
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.
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 1105 of file Instructions.cpp.
References llvm::User::getNumOperands(), and llvm::User::getOperand().
Referenced by isOnlyCopiedFromConstantGlobal().
| bool GetElementPtrInst::hasAllConstantIndices | ( | ) | const |
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.
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 1119 of file Instructions.cpp.
References llvm::User::getNumOperands(), and llvm::User::getOperand().
| static bool llvm::GetElementPtrInst::classof | ( | const GetElementPtrInst * | ) | [inline, static] |
| static bool llvm::GetElementPtrInst::classof | ( | const Instruction * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::Instruction.
Definition at line 563 of file Instructions.h.
References llvm::Instruction::getOpcode().
| static bool llvm::GetElementPtrInst::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::Instruction.
Definition at line 566 of file Instructions.h.
References classof().