My Project
Classes | Namespaces | Typedefs | Functions
Matchers.h File Reference
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/StandardTypes.h"
Include dependency graph for Matchers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mlir::detail::attr_value_binder< AttrClass, ValueType, typename >
 
struct  mlir::detail::constant_op_binder< AttrT >
 
struct  mlir::detail::constant_int_op_binder
 
struct  mlir::detail::constant_int_value_matcher< TargetValue >
 
struct  mlir::detail::constant_int_not_value_matcher< TargetNotValue >
 
struct  mlir::detail::op_matcher< OpClass >
 The matcher that matches a certain kind of op. More...
 
struct  mlir::detail::AnyValueMatcher
 Terminal matcher, always returns true. More...
 
struct  mlir::detail::PatternMatcherValue
 Binds to a specific value and matches it. More...
 
struct  mlir::detail::RecursivePatternMatcher< OpType, OperandMatchers >
 RecursivePatternMatcher that composes. More...
 

Namespaces

 mlir
 
 mlir::detail
 Check if a Callable type can be invoked with the given set of arg types.
 
 mlir::matchers
 

Typedefs

template<typename T , typename OperationOrValue >
using mlir::detail::has_operation_or_value_matcher_t = decltype(std::declval< T >().match(std::declval< OperationOrValue >()))
 

Functions

template<typename MatcherClass >
std::enable_if_t< is_detected< detail::has_operation_or_value_matcher_t, MatcherClass, Value >::value, bool > mlir::detail::matchOperandOrValueAtIndex (Operation *op, unsigned idx, MatcherClass &matcher)
 Statically switch to a Value matcher. More...
 
template<typename MatcherClass >
std::enable_if_t< is_detected< detail::has_operation_or_value_matcher_t, MatcherClass, Operation * >::value, bool > mlir::detail::matchOperandOrValueAtIndex (Operation *op, unsigned idx, MatcherClass &matcher)
 Statically switch to an Operation matcher. More...
 
template<typename TupleT , class CallbackT , std::size_t... Is>
constexpr void mlir::detail::enumerateImpl (TupleT &&tuple, CallbackT &&callback, std::index_sequence< Is... >)
 
template<typename... Tys, typename CallbackT >
constexpr void mlir::detail::enumerate (std::tuple< Tys... > &tuple, CallbackT &&callback)
 
template<typename AttrT >
detail::constant_op_binder< AttrT > mlir::m_Constant (AttrT *bind_value)
 
detail::constant_int_value_matcher< 1 > mlir::m_One ()
 Matches a constant scalar / vector splat / tensor splat integer one. More...
 
template<typename OpClass >
detail::op_matcher< OpClass > mlir::m_Op ()
 Matches the given OpClass. More...
 
detail::constant_int_value_matcher< 0 > mlir::m_Zero ()
 Matches a constant scalar / vector splat / tensor splat integer zero. More...
 
detail::constant_int_not_value_matcher< 0 > mlir::m_NonZero ()
 
template<typename Pattern >
bool mlir::matchPattern (Value value, const Pattern &pattern)
 Entry point for matching a pattern over a Value. More...
 
template<typename Pattern >
bool mlir::matchPattern (Operation *op, const Pattern &pattern)
 Entry point for matching a pattern over an Operation. More...
 
detail::constant_int_op_binder mlir::m_ConstantInt (IntegerAttr::ValueType *bind_value)
 
template<typename OpType , typename... Matchers>
auto mlir::m_Op (Matchers... matchers)
 
auto mlir::matchers::m_Any ()
 
auto mlir::matchers::m_Val (Value v)