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::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.
References getUser(), and llvm::User::op_begin().
Referenced by allUsesTruncate(), dominatesAllUsesOf(), 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 llvm::MemorySSA::dominates(), eliminateSwiftErrorAlloca(), ExtendUsesToFormExtLoad(), findGlueUse(), getCaseResults(), getOperandNo(), operandWithNewAddressSpaceOrCreatePoison(), OptimizeGlobalAddressOfAllocation(), performMemPairCombine(), llvm::propagatesPoison(), replaceAllUsesOfWithIn(), and llvm::sandboxir::Value::replaceUsesWithIf().
|
inline |
Definition at line 882 of file Value.h.
Referenced by llvm::SDNode::DropOperands(), eliminateSwiftErrorAlloca(), llvm::SITargetLowering::emitExpandAtomicRMW(), 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.
References RHS, and std::swap().
Referenced by Use().
Destroys Use operands when the number of operands of a User changes.
Definition at line 35 of file Use.cpp.
Referenced by llvm::User::growHungoffUses(), and llvm::User::operator delete().