My Project
|
#include <Value.h>
Classes | |
struct | ImplTypeTraits |
Public Types | |
enum | Kind { Kind::OpResult0 = 0, Kind::OpResult1 = 1, Kind::TrailingOpResult = 2, Kind::BlockArgument = 3 } |
using | ImplType = llvm::PointerIntPair< void *, 2, Kind, ImplTypeTraits > |
using | use_iterator = FilteredValueUseIterator< 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 > |
Public Member Functions | |
Value (std::nullptr_t) | |
Value (ImplType ownerAndKind={}) | |
Value (const Value &)=default | |
Value & | operator= (const Value &)=default |
template<typename U > | |
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 |
Value | operator* () const |
Value * | operator-> () 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 |
Location | getLoc () |
Region * | getParentRegion () |
Return the Region in which this Value is defined. More... | |
IRObjectWithUseList< OpOperand > * | getUseList () const |
Provide the use list that is attached to this value. More... | |
void | dropAllUses () const |
Drop all uses of this object from their respective owners. More... | |
void | replaceAllUsesWith (Value newValue) const |
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 |
Kind | getKind () const |
Returns the kind of this value. More... | |
void | print (raw_ostream &os) |
void | dump () |
void * | getAsOpaquePointer () const |
Methods for supporting PointerLikeTypeTraits. More... | |
Static Public Member Functions | |
static Value | getFromOpaquePointer (const void *pointer) |
Protected Member Functions | |
Value (detail::BlockArgumentImpl *impl) | |
Construct a value. More... | |
Value (Operation *op, unsigned resultNo) | |
Static Protected Member Functions | |
static bool | canPackResultInline (unsigned resultNo) |
Returns true if the given operation result can be packed inline. More... | |
Protected Attributes | |
ImplType | ownerAndKind |
Friends | |
::llvm::hash_code | hash_value (Value arg) |
Make Value hashable. More... | |
This class represents an instance of an SSA value in the MLIR system, representing a computable value that has a type and a set of users. An SSA value is either a BlockArgument or the result of an operation. Note: This class has value-type semantics and is just a simple wrapper around a ValueImpl that is either owner by a block(in the case of a BlockArgument) or an Operation(in the case of an OpResult).
using mlir::Value::ImplType = llvm::PointerIntPair<void *, 2, Kind, ImplTypeTraits> |
This class implements an iterator over the uses of a value.
|
strong |
The enumeration represents the various different kinds of values the internal representation may take. We steal 2 bits to support a total of 4 possible values.
|
inline |
|
inline |
|
default |
|
protected |
Construct a value.
|
protected |
|
inlinestaticprotected |
Returns true if the given operation result can be packed inline.
|
inline |
void Value::dropAllUses | ( | ) | const |
Drop all uses of this object from their respective owners.
void Value::dump | ( | ) |
|
inline |
|
inline |
|
inline |
Methods for supporting PointerLikeTypeTraits.
|
inline |
Utility to get the associated MLIRContext that this value is defined in.
Operation * Value::getDefiningOp | ( | ) | const |
If this value is the result of an operation, return the operation that defines it.
If this value is the result of an Operation, return the operation that defines it.
|
inlinestatic |
|
inline |
Returns the kind of this value.
Location Value::getLoc | ( | ) |
If this value is the result of an operation, use it as a location, otherwise return an unknown location.
Type Value::getType | ( | ) | const |
Return the type of this value.
IRObjectWithUseList< OpOperand > * Value::getUseList | ( | ) | const |
Provide the use list that is attached to this value.
|
inline |
|
inline |
Returns a range of all uses, which is useful for iterating over all uses.
bool Value::hasOneUse | ( | ) | const |
Returns true if this value has exactly one use.
|
inline |
|
inline |
|
inline |
|
inline |
Temporary methods to enable transition of Value to being used as a value-type. TODO(riverriddle) Remove these when all usages have been removed.
|
inline |
|
inline |
void Value::print | ( | raw_ostream & | os | ) |
void Value::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. When this returns there are zero uses of 'this'.
void Value::setType | ( | Type | newType | ) |
Mutate the type of this Value to be of the specified type.
Mutate the type of this Value to be of the specified type.
Note that this is an extremely dangerous operation which can create completely invalid IR very easily. It is strongly recommended that you recreate IR objects with the right types instead of mutating them in place.
auto Value::use_begin | ( | ) | const |
bool Value::use_empty | ( | ) | const |
Returns true if this value has no uses.
|
inline |
|
inline |
|
inline |
|
protected |
This value represents the 'owner' of the value and its kind. See the 'Kind' enumeration above for a more detailed description of each kind of owner.