MLIR  16.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::detail::PDLByteCode::MatchResult Struct Reference

Each successful match returns a MatchResult, which contains information necessary to execute the rewriter and indicates the originating pattern. More...

#include "Rewrite/ByteCode.h"

+ Collaboration diagram for mlir::detail::PDLByteCode::MatchResult:

Public Member Functions

 MatchResult (Location loc, const PDLByteCodePattern &pattern, PatternBenefit benefit)
 
 MatchResult (const MatchResult &)=delete
 
MatchResultoperator= (const MatchResult &)=delete
 
 MatchResult (MatchResult &&other)=default
 
MatchResultoperator= (MatchResult &&)=default
 

Public Attributes

Location location
 The location of operations to be replaced. More...
 
SmallVector< const void * > values
 Memory values defined in the matcher that are passed to the rewriter. More...
 
SmallVector< TypeRange, 0 > typeRangeValues
 Memory used for the range input values. More...
 
SmallVector< ValueRange, 0 > valueRangeValues
 
const PDLByteCodePatternpattern
 The originating pattern that was matched. More...
 
PatternBenefit benefit
 The current benefit of the pattern that was matched. More...
 

Detailed Description

Each successful match returns a MatchResult, which contains information necessary to execute the rewriter and indicates the originating pattern.

Definition at line 124 of file ByteCode.h.

Constructor & Destructor Documentation

◆ MatchResult() [1/3]

mlir::detail::PDLByteCode::MatchResult::MatchResult ( Location  loc,
const PDLByteCodePattern pattern,
PatternBenefit  benefit 
)
inline

Definition at line 125 of file ByteCode.h.

◆ MatchResult() [2/3]

mlir::detail::PDLByteCode::MatchResult::MatchResult ( const MatchResult )
delete

◆ MatchResult() [3/3]

mlir::detail::PDLByteCode::MatchResult::MatchResult ( MatchResult &&  other)
default

Member Function Documentation

◆ operator=() [1/2]

MatchResult& mlir::detail::PDLByteCode::MatchResult::operator= ( const MatchResult )
delete

◆ operator=() [2/2]

MatchResult& mlir::detail::PDLByteCode::MatchResult::operator= ( MatchResult &&  )
default

Member Data Documentation

◆ benefit

PatternBenefit mlir::detail::PDLByteCode::MatchResult::benefit

The current benefit of the pattern that was matched.

Definition at line 145 of file ByteCode.h.

◆ location

Location mlir::detail::PDLByteCode::MatchResult::location

The location of operations to be replaced.

Definition at line 134 of file ByteCode.h.

Referenced by mlir::detail::PDLByteCode::rewrite().

◆ pattern

const PDLByteCodePattern* mlir::detail::PDLByteCode::MatchResult::pattern

The originating pattern that was matched.

This is always non-null, but represented with a pointer to allow for assignment.

Definition at line 143 of file ByteCode.h.

Referenced by mlir::PatternApplicator::matchAndRewrite(), and mlir::detail::PDLByteCode::rewrite().

◆ typeRangeValues

SmallVector<TypeRange, 0> mlir::detail::PDLByteCode::MatchResult::typeRangeValues

Memory used for the range input values.

Definition at line 138 of file ByteCode.h.

Referenced by executeGetOperandsResults().

◆ valueRangeValues

SmallVector<ValueRange, 0> mlir::detail::PDLByteCode::MatchResult::valueRangeValues

Definition at line 139 of file ByteCode.h.

Referenced by executeGetOperandsResults().

◆ values

SmallVector<const void *> mlir::detail::PDLByteCode::MatchResult::values

Memory values defined in the matcher that are passed to the rewriter.

Definition at line 136 of file ByteCode.h.

Referenced by executeGetOperandsResults(), and mlir::detail::PDLByteCode::rewrite().


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