MLIR 22.0.0git
mlir::detail::AttrOpBinder< AttrT > Struct Template Reference

The matcher that matches operations that have the specified attribute name, and binds the attribute value. More...

#include "mlir/IR/Matchers.h"

Public Member Functions

 AttrOpBinder (StringRef attrName, AttrT *bindValue)
 Creates a matcher instance that binds the attribute value to bind_value if match succeeds.
 AttrOpBinder (StringRef attrName)
 Creates a matcher instance that doesn't bind if match succeeds.
bool match (Operation *op)

Public Attributes

StringRef attrName
AttrT * bindValue

Detailed Description

template<typename AttrT>
struct mlir::detail::AttrOpBinder< AttrT >

The matcher that matches operations that have the specified attribute name, and binds the attribute value.

Definition at line 140 of file Matchers.h.

Constructor & Destructor Documentation

◆ AttrOpBinder() [1/2]

template<typename AttrT>
mlir::detail::AttrOpBinder< AttrT >::AttrOpBinder ( StringRef attrName,
AttrT * bindValue )
inline

Creates a matcher instance that binds the attribute value to bind_value if match succeeds.

Definition at line 143 of file Matchers.h.

References attrName, and bindValue.

◆ AttrOpBinder() [2/2]

template<typename AttrT>
mlir::detail::AttrOpBinder< AttrT >::AttrOpBinder ( StringRef attrName)
inline

Creates a matcher instance that doesn't bind if match succeeds.

Definition at line 146 of file Matchers.h.

References attrName, bindValue, and nullptr.

Member Function Documentation

◆ match()

template<typename AttrT>
bool mlir::detail::AttrOpBinder< AttrT >::match ( Operation * op)
inline

Definition at line 148 of file Matchers.h.

References attrName, bindValue, and mlir::Operation::getAttrOfType().

Member Data Documentation

◆ attrName

template<typename AttrT>
StringRef mlir::detail::AttrOpBinder< AttrT >::attrName

Definition at line 156 of file Matchers.h.

Referenced by AttrOpBinder(), AttrOpBinder(), and match().

◆ bindValue

template<typename AttrT>
AttrT* mlir::detail::AttrOpBinder< AttrT >::bindValue

Definition at line 157 of file Matchers.h.

Referenced by AttrOpBinder(), AttrOpBinder(), and match().


The documentation for this struct was generated from the following file: