MLIR
15.0.0git
|
This class represents an argument of a Block. More...
#include "mlir/IR/Value.h"
Public Member Functions | |
Block * | getOwner () const |
Returns the block that owns this argument. More... | |
unsigned | getArgNumber () const |
Returns the number of this argument. More... | |
Location | getLoc () const |
Return the location for this argument. More... | |
void | setLoc (Location loc) |
![]() | |
constexpr | Value (detail::ValueImpl *impl=nullptr) |
template<typename U > | |
bool | isa () const |
template<typename First , typename Second , typename... Rest> | |
bool | isa () const |
template<typename U > | |
U | dyn_cast () const |
template<typename U > | |
U | dyn_cast_or_null () const |
template<typename U > | |
U | cast () const |
operator bool () const | |
bool | operator== (const Value &other) const |
bool | operator!= (const Value &other) const |
Type | getType () const |
Return the type of this value. More... | |
MLIRContext * | getContext () const |
Utility to get the associated MLIRContext that this value is defined in. More... | |
void | setType (Type newType) |
Mutate the type of this Value to be of the specified type. More... | |
Operation * | getDefiningOp () const |
If this value is the result of an operation, return the operation that defines it. More... | |
template<typename OpTy > | |
OpTy | getDefiningOp () const |
If this value is the result of an operation of type OpTy, return the operation that defines it. More... | |
Location | getLoc () const |
Return the location of this value. More... | |
void | setLoc (Location loc) |
Region * | getParentRegion () |
Return the Region in which this Value is defined. More... | |
Block * | getParentBlock () |
Return the Block in which this Value is defined. More... | |
void | dropAllUses () const |
Drop all uses of this object from their respective owners. More... | |
void | replaceAllUsesWith (Value newValue) const |
Replace all uses of 'this' value with the new value, updating anything in the IR that uses 'this' to use the other value instead. More... | |
void | replaceAllUsesExcept (Value newValue, const SmallPtrSetImpl< Operation *> &exceptions) const |
Replace all uses of 'this' value with 'newValue', updating anything in the IR that uses 'this' to use the other value instead except if the user is listed in 'exceptions' . More... | |
void | replaceAllUsesExcept (Value newValue, Operation *exceptedUser) const |
Replace all uses of 'this' value with 'newValue', updating anything in the IR that uses 'this' to use the other value instead except if the user is 'exceptedUser'. More... | |
void | replaceUsesWithIf (Value newValue, function_ref< bool(OpOperand &)> shouldReplace) |
Replace all uses of 'this' value with 'newValue' if the given callback returns true. More... | |
bool | isUsedOutsideOfBlock (Block *block) |
Returns true if the value is used outside of the given block. More... | |
use_iterator | use_begin () const |
use_iterator | use_end () const |
use_range | getUses () const |
Returns a range of all uses, which is useful for iterating over all uses. More... | |
bool | hasOneUse () const |
Returns true if this value has exactly one use. More... | |
bool | use_empty () const |
Returns true if this value has no uses. More... | |
user_iterator | user_begin () const |
user_iterator | user_end () const |
user_range | getUsers () const |
void | print (raw_ostream &os) |
void | print (raw_ostream &os, const OpPrintingFlags &flags) |
void | print (raw_ostream &os, AsmState &state) |
void | dump () |
void | printAsOperand (raw_ostream &os, AsmState &state) |
Print this value as if it were an operand. More... | |
void * | getAsOpaquePointer () const |
Methods for supporting PointerLikeTypeTraits. More... | |
detail::ValueImpl * | getImpl () const |
Static Public Member Functions | |
static bool | classof (Value value) |
![]() | |
static Value | getFromOpaquePointer (const void *pointer) |
Additional Inherited Members | |
![]() | |
using | use_iterator = ValueUseIterator< OpOperand > |
This class implements an iterator over the uses of a value. More... | |
using | use_range = iterator_range< use_iterator > |
using | user_iterator = ValueUserIterator< use_iterator, OpOperand > |
using | user_range = iterator_range< user_iterator > |
![]() | |
detail::ValueImpl * | impl |
A pointer to the internal implementation of the value. More... | |
|
inlinestatic |
Definition at line 304 of file Value.h.
References mlir::Value::getImpl().
|
inline |
Returns the number of this argument.
Definition at line 312 of file Value.h.
Referenced by mlir::AsmParserState::addDefinition(), mlir::AsmParserState::addUses(), mlir::scf::buildLoopNest(), collapseBranch(), collectUnderlyingAddressValues(), mlir::Block::eraseArguments(), getAssumedUniqueReturnOp(), getGenericEffectsImpl(), getLspDiagnoticFromDiag(), hoistReadWrite(), mlir::Liveness::print(), mlir::Value::print(), removeBufferizationAttributes(), setInPlaceFuncArgument(), sourceMaterializationCallback(), validateSupportedControlFlow(), and vectorizeAsLinalgGeneric().
|
inline |
Return the location for this argument.
Definition at line 315 of file Value.h.
Referenced by buildUnresolvedTargetMaterialization(), generateFusedElementwiseOpRegion(), isSumOfMul(), mlir::AsmPrinter::Impl::printIntegerSet(), and shouldPrintElementsAttrWithHex().
|
inline |
Returns the block that owns this argument.
Definition at line 309 of file Value.h.
Referenced by mlir::AsmParserState::addDefinition(), mlir::AsmParserState::addUses(), annotateConflict(), collapseBranch(), collectUnderlyingAddressValues(), mlir::getForInductionVarOwner(), hoistReadWrite(), mlir::linalg::TileLoopNest::isEmpty(), linalgOpToLoopsImpl(), mlir::linalg::PadOpTransformationPattern::matchAndRewrite(), removeBufferizationAttributes(), mlir::ConversionPatternRewriter::replaceUsesOfBlockArgument(), setInPlaceFuncArgument(), sourceMaterializationCallback(), and validateSupportedControlFlow().