LLVM 20.0.0git
|
A Use represents the edge between a Value definition and its users. More...
#include "llvm/IR/Use.h"
Public Member Functions | |
Use (const Use &U)=delete | |
void | swap (Use &RHS) |
Provide a fast substitute to std::swap<Use> that also works with less standard-compliant compilers. | |
operator Value * () const | |
Value * | get () const |
User * | getUser () const |
Returns the User that contains this Use. | |
void | set (Value *Val) |
Value * | operator= (Value *RHS) |
const Use & | operator= (const Use &RHS) |
Value * | operator-> () |
const Value * | operator-> () const |
Use * | getNext () const |
unsigned | getOperandNo () const |
Return the operand # of this use in its User. | |
Static Public Member Functions | |
static void | zap (Use *Start, const Use *Stop, bool del=false) |
Destroys Use operands when the number of operands of a User changes. | |
Friends | |
class | Value |
class | User |
A Use represents the edge between a Value definition and its users.
This is notionally a two-dimensional linked list. It supports traversing all of the uses for a particular value definition. It also supports jumping directly to the used value when we arrive from the User's operands, and jumping directly to the User when we arrive from the Value's uses.
|
inline |
Definition at line 66 of file Use.h.
Referenced by llvm::User::getDescriptor(), llvm::simplify_type< const Use >::getSimplifiedValue(), llvm::simplify_type< Use >::getSimplifiedValue(), and operandWithNewAddressSpaceOrCreatePoison().
unsigned llvm::Use::getOperandNo | ( | ) | const |
Return the operand # of this use in its User.
Definition at line 31 of file Use.cpp.
Referenced by allUsesTruncate(), CombineBaseUpdate(), combineOp_VLToVWOp_VL(), combineVSelectToBLENDV(), dominatesAllUsesOf(), llvm::RISCVDAGToDAGISel::hasAllNBitUsers(), llvm::SITargetLowering::hasMemSDNodeUser(), hasNonFlagsUse(), isCompatibleReplacement(), and llvm::propagatesPoison().
|
inline |
Returns the User that contains this Use.
For an instruction operand, for example, this will return the instruction.
Definition at line 72 of file Use.h.
Referenced by allUsesTruncate(), CombineBaseUpdate(), combineOp_VLToVWOp_VL(), CombineVLDDUP(), combineVSelectToBLENDV(), llvm::MemorySSA::dominates(), eliminateSwiftErrorAlloca(), ExtendUsesToFormExtLoad(), getCaseResults(), llvm::RISCVDAGToDAGISel::hasAllNBitUsers(), llvm::SITargetLowering::hasMemSDNodeUser(), hasNonFlagsUse(), isF128MovedToParts(), isI128MovedToParts(), operandWithNewAddressSpaceOrCreatePoison(), OptimizeGlobalAddressOfAllocation(), performMemPairCombine(), PerformMVEVLDCombine(), performNEONPostLDSTCombine(), performPostLD1Combine(), llvm::propagatesPoison(), llvm::SelectionDAG::ReplaceAllUsesOfValuesWith(), replaceAllUsesOfWithIn(), llvm::X86TargetLowering::shouldReduceLoadWidth(), usePartialVectorLoads(), and llvm::Value::Value().
|
inline |
Definition at line 886 of file Value.h.
Referenced by llvm::SDNode::DropOperands(), eliminateSwiftErrorAlloca(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::SelectionDAG::MorphNodeTo(), operator=(), OptimizeGlobalAddressOfAllocation(), llvm::SwitchInst::removeCase(), llvm::SelectionDAG::RemoveDeadNodes(), llvm::IndirectBrInst::removeDestination(), llvm::SelectionDAG::ReplaceAllUsesOfValuesWith(), llvm::SelectionDAG::ReplaceAllUsesOfValueWith(), llvm::SelectionDAG::ReplaceAllUsesWith(), and sinkLastInstruction().
void llvm::Use::swap | ( | Use & | RHS | ) |
Provide a fast substitute to std::swap<Use> that also works with less standard-compliant compilers.
Definition at line 14 of file Use.cpp.
Referenced by Use().