LLVM
8.0.1
|
This is the common base class of value handles. More...
#include "llvm/IR/ValueHandle.h"
Public Member Functions | |
ValueHandleBase (HandleBaseKind Kind) | |
ValueHandleBase (HandleBaseKind Kind, Value *V) | |
~ValueHandleBase () | |
Value * | operator= (Value *RHS) |
Value * | operator= (const ValueHandleBase &RHS) |
Value * | operator-> () const |
Value & | operator* () const |
Static Public Member Functions | |
static void | ValueIsDeleted (Value *V) |
static void | ValueIsRAUWd (Value *Old, Value *New) |
Protected Types | |
enum | HandleBaseKind { Assert, Callback, Weak, WeakTracking } |
This indicates what sub class the handle actually is. More... | |
Protected Member Functions | |
ValueHandleBase (const ValueHandleBase &RHS) | |
ValueHandleBase (HandleBaseKind Kind, const ValueHandleBase &RHS) | |
Value * | getValPtr () const |
void | RemoveFromUseList () |
Remove this ValueHandle from its current use list. More... | |
void | clearValPtr () |
Clear the underlying pointer without clearing the use list. More... | |
Static Protected Member Functions | |
static bool | isValid (Value *V) |
Friends | |
class | Value |
This is the common base class of value handles.
ValueHandle's are smart pointers to Value's that have special behavior when the value is deleted or ReplaceAllUsesWith'd. See the specific handles below for details.
Definition at line 30 of file ValueHandle.h.
|
protected |
This indicates what sub class the handle actually is.
This is to avoid having a vtable for the light-weight handle pointers. The fully general Callback version does have a vtable.
Enumerator | |
---|---|
Assert | |
Callback | |
Weak | |
WeakTracking |
Definition at line 38 of file ValueHandle.h.
|
inlineprotected |
Definition at line 40 of file ValueHandle.h.
|
inlineprotected |
Definition at line 43 of file ValueHandle.h.
References getValPtr(), and isValid().
|
inlineexplicit |
Definition at line 57 of file ValueHandle.h.
|
inline |
Definition at line 59 of file ValueHandle.h.
References getValPtr(), and isValid().
|
inline |
Definition at line 65 of file ValueHandle.h.
References getValPtr(), isValid(), and RemoveFromUseList().
|
inlineprotected |
Clear the underlying pointer without clearing the use list.
This should only be used if a derived class has manually removed the handle from the use list.
Definition at line 111 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), List, llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::setPointer(), ValueIsDeleted(), and ValueIsRAUWd().
Referenced by llvm::PoisoningVH< llvm::BasicBlock >::operator=(), and llvm::PoisoningVH< llvm::BasicBlock >::~PoisoningVH().
|
inlineprotected |
Definition at line 96 of file ValueHandle.h.
Referenced by llvm::cflaa::FunctionHandle< AAResult >::allUsesReplacedWith(), llvm::IVStrideUse::getUser(), llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::isEqual(), llvm::WeakVH::operator Value *(), llvm::WeakTrackingVH::operator Value *(), llvm::CallbackVH::operator Value *(), llvm::AssertingVH< ValueTy >::operator ValueTy *(), llvm::TrackingVH< ValueTy >::operator ValueTy *(), llvm::PoisoningVH< ValueTy >::operator ValueTy *(), operator*(), llvm::AssertingVH< llvm::PHINode >::operator*(), llvm::TrackingVH< llvm::Value >::operator*(), llvm::PoisoningVH< llvm::BasicBlock >::operator*(), operator->(), llvm::AssertingVH< llvm::PHINode >::operator->(), llvm::TrackingVH< llvm::Value >::operator->(), llvm::PoisoningVH< llvm::BasicBlock >::operator->(), operator=(), llvm::AssertingVH< llvm::PHINode >::operator=(), llvm::TrackingVH< llvm::Value >::operator=(), llvm::WeakTrackingVH::pointsToAliveValue(), ValueHandleBase(), and ~ValueHandleBase().
Definition at line 98 of file ValueHandle.h.
References RemoveFromUseList().
Referenced by operator=(), llvm::WeakTrackingVH::pointsToAliveValue(), ValueHandleBase(), and ~ValueHandleBase().
|
inline |
Definition at line 93 of file ValueHandle.h.
References getValPtr().
|
inline |
Definition at line 92 of file ValueHandle.h.
References getValPtr().
Definition at line 70 of file ValueHandle.h.
References getValPtr(), isValid(), and RemoveFromUseList().
Referenced by llvm::WeakVH::operator=(), llvm::WeakTrackingVH::operator=(), llvm::MMIAddrLabelMapCallbackPtr::setPtr(), llvm::CallbackVH::setValPtr(), llvm::WeakTrackingVH::WeakTrackingVH(), and llvm::WeakVH::WeakVH().
|
inline |
Definition at line 81 of file ValueHandle.h.
References getValPtr(), isValid(), and RemoveFromUseList().
|
protected |
Remove this ValueHandle from its current use list.
Definition at line 806 of file Value.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::isPointerIntoBucketsArray(), and llvm::LLVMContextImpl::ValueHandles.
Referenced by isValid(), operator=(), and ~ValueHandleBase().
|
static |
Definition at line 832 of file Value.cpp.
References assert(), Assert, llvm::dbgs(), llvm::Value::getContext(), llvm::Value::getName(), llvm::Value::getType(), llvm_unreachable, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueHandles.
Referenced by clearValPtr(), findInitTrampoline(), and llvm::Value::~Value().
Definition at line 885 of file Value.cpp.
References assert(), Assert, llvm::dbgs(), llvm::Value::getContext(), llvm::Value::getName(), llvm::Value::getType(), llvm_unreachable, and llvm::LLVMContext::pImpl.
Referenced by clearValPtr(), contains(), findInitTrampoline(), llvm::formLCSSAForInstructions(), llvm::MemorySSAUpdater::removeMemoryAccess(), llvm::SSAUpdaterBulk::RewriteAllUses(), and llvm::SSAUpdater::RewriteUse().
|
friend |
Definition at line 31 of file ValueHandle.h.