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. More... | |
![]() | |
unsigned | getOpcode () const |
![]() | |
~User () | |
void | operator delete (void *Usr) |
operator delete - free memory allocated for User and Use objects More... | |
void | operator delete (void *, unsigned) |
placement delete - required by std, but never called. More... | |
void | operator delete (void *, unsigned, bool) |
placement delete - required by std, but never called. More... | |
Value * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Value *Val) |
const Use & | getOperandUse (unsigned i) const |
Use & | getOperandUse (unsigned i) |
unsigned | getNumOperands () const |
op_iterator | op_begin () |
const_op_iterator | op_begin () const |
op_iterator | op_end () |
const_op_iterator | op_end () const |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
void | dropAllReferences () |
void | replaceUsesOfWith (Value *From, Value *To) |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
Static Public Member Functions | |
static unsigned | getPointerOperandIndex () |
![]() | |
static bool | classof (const Instruction *I) |
static bool | classof (const ConstantExpr *CE) |
static bool | classof (const Value *V) |
![]() | |
static unsigned | getOpcode (const Value *V) |
static bool | classof (const Instruction *) |
static bool | classof (const ConstantExpr *) |
static bool | classof (const Value *V) |
![]() | |
static bool | classof (const Value *V) |
Friends | |
class | GetElementPtrInst |
class | ConstantExpr |
Definition at line 357 of file Operator.h.
|
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 444 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().
|
inline |
Definition at line 404 of file Operator.h.
References llvm::User::getNumOperands().
|
inline |
getPointerAddressSpace - Method to return the address space of the pointer operand.
Definition at line 400 of file Operator.h.
Referenced by DecomposeGEPExpression(), and isGEPKnownNonNull().
|
inline |
Definition at line 382 of file Operator.h.
References llvm::User::getOperand().
Referenced by llvm::DependenceAnalysis::depends(), llvm::DependenceAnalysis::getSplitIteration(), isGEPKnownNonNull(), llvm::ObjectSizeOffsetVisitor::visitGEPOperator(), and llvm::ObjectSizeOffsetEvaluator::visitGEPOperator().
|
inline |
Definition at line 385 of file Operator.h.
References llvm::User::getOperand().
|
inlinestatic |
Definition at line 388 of file Operator.h.
|
inline |
getPointerOperandType - Method to return the pointer operand as a PointerType.
Definition at line 394 of file Operator.h.
References getPointerOperand().
Referenced by llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
|
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 428 of file Operator.h.
References I.
Referenced by llvm::InstCombiner::FoldGEPICmp().
|
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 415 of file Operator.h.
References llvm::CallingConv::C, and I.
Referenced by DecomposeGEPExpression(), and shouldMergeGEPs().
|
inline |
Definition at line 408 of file Operator.h.
References llvm::User::getNumOperands().
|
inline |
Definition at line 377 of file Operator.h.
References llvm::User::op_begin().
Referenced by llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
|
inline |
Definition at line 378 of file Operator.h.
References llvm::User::op_begin().
|
inline |
Definition at line 379 of file Operator.h.
References llvm::User::op_end().
Referenced by llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
|
inline |
Definition at line 380 of file Operator.h.
References llvm::User::op_end().
|
inline |
isInBounds - Test whether this is an inbounds GEP, as defined by LangRef.html.
Definition at line 373 of file Operator.h.
References llvm::Value::SubclassOptionalData.
Referenced by llvm::EmitGEPOffset(), llvm::InstCombiner::FoldGEPICmp(), and isGEPKnownNonNull().
|
friend |
Definition at line 364 of file Operator.h.
|
friend |
Definition at line 363 of file Operator.h.