MLIR  21.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions
mlir::query::matcher Namespace Reference

A matcher encapsulating getBackwardSlice method from SliceAnalysis.h. More...

Namespaces

 internal
 

Classes

struct  has_simple_match
 
struct  has_simple_match< T, std::void_t< decltype(std::declval< T >().match(std::declval< Operation * >()))> >
 
struct  has_bound_match
 
struct  has_bound_match< T, std::void_t< decltype(std::declval< T >().match(std::declval< Operation * >(), std::declval< SetVector< Operation * > & >()))> >
 
class  MatcherInterface
 
class  MatcherFnImpl
 
class  DynMatcher
 
class  MatchFinder
 A class that provides utilities to find operations in the IR. More...
 
class  Registry
 
class  BackwardSliceMatcher
 
class  VariantMatcher
 
class  VariantValue
 
struct  ParserValue
 
struct  MatcherCompletion
 
class  RegistryManager
 

Typedefs

using ConstructorMap = llvm::StringMap< std::unique_ptr< const internal::MatcherDescriptor > >
 
using MatcherCtor = const internal::MatcherDescriptor *
 

Enumerations

enum class  ArgKind { Boolean , Matcher , Signed , String }
 

Functions

template<typename Matcher >
BackwardSliceMatcher< Matcher > m_GetDefinitions (Matcher innerMatcher, int64_t maxDepth, bool inclusive, bool omitBlockArguments, bool omitUsesFromAbove)
 Matches transitive defs of a top-level operation up to N levels. More...
 
template<typename Matcher >
BackwardSliceMatcher< Matcher > m_GetAllDefinitions (Matcher innerMatcher, int64_t maxDepth)
 Matches all transitive defs of a top-level operation up to N levels. More...
 

Detailed Description

A matcher encapsulating getBackwardSlice method from SliceAnalysis.h.

Additionally, it limits the slice computation to a certain depth level using a custom filter.

Example: starting from node 9, assuming the matcher

computes the slice for the first two depth levels:

1 2 3 4 |_______| |______| | | | | 5 6 |___|_____________| | | 7 8 |_______________| | 9

Assuming all local orders match the numbering order: {5, 7, 6, 8, 9}

Typedef Documentation

◆ ConstructorMap

using mlir::query::matcher::ConstructorMap = typedef llvm::StringMap<std::unique_ptr<const internal::MatcherDescriptor> >

Definition at line 25 of file Registry.h.

◆ MatcherCtor

Definition at line 29 of file RegistryManager.h.

Enumeration Type Documentation

◆ ArgKind

Enumerator
Boolean 
Matcher 
Signed 
String 

Definition at line 24 of file VariantValue.h.

Function Documentation

◆ m_GetAllDefinitions()

template<typename Matcher >
BackwardSliceMatcher<Matcher> mlir::query::matcher::m_GetAllDefinitions ( Matcher  innerMatcher,
int64_t  maxDepth 
)
inline

Matches all transitive defs of a top-level operation up to N levels.

Definition at line 132 of file SliceMatchers.h.

◆ m_GetDefinitions()

template<typename Matcher >
BackwardSliceMatcher<Matcher> mlir::query::matcher::m_GetDefinitions ( Matcher  innerMatcher,
int64_t  maxDepth,
bool  inclusive,
bool  omitBlockArguments,
bool  omitUsesFromAbove 
)
inline

Matches transitive defs of a top-level operation up to N levels.

Definition at line 122 of file SliceMatchers.h.