MLIR
18.0.0git
|
Storage type of byte-code interpreter values. More...
#include "mlir/IR/PatternMatch.h"
Public Types | |
enum class | Kind { Attribute , Operation , Type , TypeRange , Value , ValueRange } |
The underlying kind of a PDL value. More... | |
Public Member Functions | |
PDLValue (const PDLValue &other)=default | |
Construct a new PDL value. More... | |
PDLValue (std::nullptr_t=nullptr) | |
PDLValue (Attribute value) | |
PDLValue (Operation *value) | |
PDLValue (Type value) | |
PDLValue (TypeRange *value) | |
PDLValue (Value value) | |
PDLValue (ValueRange *value) | |
template<typename T > | |
bool | isa () const |
Returns true if the type of the held value is T . More... | |
template<typename T , typename ResultT = std::conditional_t< std::is_convertible<T, bool>::value, T, std::optional<T>>> | |
ResultT | dyn_cast () const |
Attempt to dynamically cast this value to type T , returns null if this value is not an instance of T . More... | |
template<typename T > | |
T | cast () const |
Cast this value to type T , asserts if this value is not an instance of T . More... | |
const void * | getAsOpaquePointer () const |
Get an opaque pointer to the value. More... | |
operator bool () const | |
Return if this value is null or not. More... | |
Kind | getKind () const |
Return the kind of this value. More... | |
void | print (raw_ostream &os) const |
Print this value to the provided output stream. More... | |
Static Public Member Functions | |
static void | print (raw_ostream &os, Kind kind) |
Print the specified value kind to an output stream. More... | |
Storage type of byte-code interpreter values.
These are passed to constraint functions as arguments.
Definition at line 747 of file PatternMatch.h.
|
strong |
The underlying kind of a PDL value.
Enumerator | |
---|---|
Attribute | |
Operation | |
Type | |
TypeRange | |
Value | |
ValueRange |
Definition at line 750 of file PatternMatch.h.
|
default |
Construct a new PDL value.
|
inline |
Definition at line 754 of file PatternMatch.h.
|
inline |
Definition at line 755 of file PatternMatch.h.
|
inline |
Definition at line 757 of file PatternMatch.h.
|
inline |
Definition at line 758 of file PatternMatch.h.
|
inline |
Definition at line 759 of file PatternMatch.h.
|
inline |
Definition at line 760 of file PatternMatch.h.
|
inline |
Definition at line 762 of file PatternMatch.h.
|
inline |
Cast this value to type T
, asserts if this value is not an instance of T
.
Definition at line 783 of file PatternMatch.h.
Referenced by mlir::detail::pdl_function_builder::ProcessBuiltinPDLValue< T >::processAsArg().
|
inline |
Attempt to dynamically cast this value to type T
, returns null if this value is not an instance of T
.
Definition at line 776 of file PatternMatch.h.
|
inline |
Get an opaque pointer to the value.
Definition at line 789 of file PatternMatch.h.
|
inline |
Return the kind of this value.
Definition at line 795 of file PatternMatch.h.
|
inline |
Returns true if the type of the held value is T
.
Definition at line 766 of file PatternMatch.h.
|
inlineexplicit |
Return if this value is null or not.
Definition at line 792 of file PatternMatch.h.
void PDLValue::print | ( | raw_ostream & | os | ) | const |
Print this value to the provided output stream.
Definition at line 104 of file PatternMatch.cpp.
References Attribute, Operation, Type, TypeRange, Value, and ValueRange.
Referenced by mlir::operator<<().
|
static |
Print the specified value kind to an output stream.
Definition at line 131 of file PatternMatch.cpp.