|
LLVM 23.0.0git
|
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= (ValueHandleBase &&RHS) |
| Value * | operator-> () const |
| Value & | operator* () const |
Static Public Member Functions | |
| static LLVM_ABI void | ValueIsDeleted (Value *V) |
| static LLVM_ABI 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) | |
| ValueHandleBase (HandleBaseKind Kind, ValueHandleBase &&RHS) | |
| Value * | getValPtr () const |
| LLVM_ABI void | RemoveFromUseList () |
| Remove this ValueHandle from its current use list. | |
| void | clearValPtr () |
| Clear the underlying pointer without clearing the use list. | |
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.
References RHS, and ValueHandleBase().
Referenced by llvm::CallbackVH::CallbackVH(), llvm::CallbackVH::CallbackVH(), operator=(), operator=(), llvm::WeakTrackingVH::operator=(), llvm::WeakVH::operator=(), ValueHandleBase(), ValueHandleBase(), ValueHandleBase(), llvm::WeakTrackingVH::WeakTrackingVH(), llvm::WeakTrackingVH::WeakTrackingVH(), llvm::WeakTrackingVH::WeakTrackingVH(), llvm::WeakVH::WeakVH(), llvm::WeakVH::WeakVH(), and llvm::WeakVH::WeakVH().
|
inlineprotected |
Definition at line 43 of file ValueHandle.h.
References getValPtr(), isValid(), RHS, and ValueHandleBase().
|
inlineprotected |
Definition at line 49 of file ValueHandle.h.
References getValPtr(), isValid(), RHS, and ValueHandleBase().
|
inlineexplicit |
Definition at line 66 of file ValueHandle.h.
|
inline |
Definition at line 68 of file ValueHandle.h.
References getValPtr(), isValid(), and Value.
|
inline |
Definition at line 74 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 144 of file ValueHandle.h.
|
inlineprotected |
Definition at line 129 of file ValueHandle.h.
References Value.
Referenced by llvm::SCEVUnknown::getType(), llvm::IVStrideUse::getUser(), llvm::SCEVUnknown::getValue(), llvm::PreservedCFGCheckerInstrumentation::BBGuard::isPoisoned(), llvm::CallbackVH::operator Value *(), llvm::WeakTrackingVH::operator Value *(), llvm::WeakVH::operator Value *(), operator*(), operator->(), operator=(), operator=(), operator=(), llvm::WeakTrackingVH::pointsToAliveValue(), llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::Unwrap(), ValueHandleBase(), ValueHandleBase(), ValueHandleBase(), and ~ValueHandleBase().
Definition at line 131 of file ValueHandle.h.
References Value.
Referenced by operator=(), operator=(), operator=(), llvm::WeakTrackingVH::pointsToAliveValue(), ValueHandleBase(), ValueHandleBase(), ValueHandleBase(), and ~ValueHandleBase().
|
inline |
Definition at line 122 of file ValueHandle.h.
References assert(), getValPtr(), and Value.
|
inline |
Definition at line 121 of file ValueHandle.h.
References getValPtr(), and Value.
|
inline |
Definition at line 90 of file ValueHandle.h.
References getValPtr(), isValid(), RemoveFromUseList(), RHS, Value, and ValueHandleBase().
Definition at line 79 of file ValueHandle.h.
References getValPtr(), isValid(), RemoveFromUseList(), RHS, and Value.
Referenced by llvm::WeakTrackingVH::operator=(), llvm::WeakTrackingVH::operator=(), llvm::WeakVH::operator=(), llvm::WeakVH::operator=(), and llvm::CallbackVH::setValPtr().
|
inline |
Definition at line 101 of file ValueHandle.h.
References getValPtr(), isValid(), RemoveFromUseList(), RHS, Value, and ValueHandleBase().
|
protected |
Remove this ValueHandle from its current use list.
Definition at line 1206 of file Value.cpp.
Referenced by operator=(), operator=(), operator=(), and ~ValueHandleBase().
Definition at line 1285 of file Value.cpp.
Referenced by llvm::MemorySSAUpdater::removeMemoryAccess(), and llvm::SSAUpdaterBulk::RewriteAllUses().
|
friend |
Definition at line 31 of file ValueHandle.h.
References Value.
Referenced by llvm::CallbackVH::allUsesReplacedWith(), llvm::PreservedCFGCheckerInstrumentation::BBGuard::allUsesReplacedWith(), llvm::CallbackVH::CallbackVH(), llvm::CallbackVH::CallbackVH(), getValPtr(), isValid(), llvm::CallbackVH::operator Value *(), llvm::WeakTrackingVH::operator Value *(), llvm::WeakVH::operator Value *(), operator*(), operator->(), operator=(), operator=(), operator=(), llvm::WeakTrackingVH::operator=(), llvm::WeakTrackingVH::operator=(), llvm::WeakVH::operator=(), llvm::WeakVH::operator=(), llvm::CallbackVH::setValPtr(), Value, ValueHandleBase(), llvm::WeakTrackingVH::WeakTrackingVH(), and llvm::WeakVH::WeakVH().