|
MLIR
22.0.0git
|
This class represents the benefit of a pattern match in a unitless scheme that ranges from 0 (very little benefit) to 65K. More...
#include "mlir/IR/PatternMatch.h"
Public Member Functions | |
| PatternBenefit ()=default | |
| PatternBenefit (unsigned benefit) | |
| PatternBenefit (const PatternBenefit &)=default | |
| PatternBenefit & | operator= (const PatternBenefit &)=default |
| bool | isImpossibleToMatch () const |
| unsigned short | getBenefit () const |
| If the corresponding pattern can match, return its benefit. If the. More... | |
| bool | operator== (const PatternBenefit &rhs) const |
| bool | operator!= (const PatternBenefit &rhs) const |
| bool | operator< (const PatternBenefit &rhs) const |
| bool | operator> (const PatternBenefit &rhs) const |
| bool | operator<= (const PatternBenefit &rhs) const |
| bool | operator>= (const PatternBenefit &rhs) const |
Static Public Member Functions | |
| static PatternBenefit | impossibleToMatch () |
This class represents the benefit of a pattern match in a unitless scheme that ranges from 0 (very little benefit) to 65K.
The most common unit to use here is the "number of operations matched" by the pattern.
This also has a sentinel representation that can be used for patterns that fail to match.
Definition at line 34 of file PatternMatch.h.
|
default |
Referenced by impossibleToMatch().
| PatternBenefit::PatternBenefit | ( | unsigned | benefit | ) |
Definition at line 20 of file PatternMatch.cpp.
|
default |
| unsigned short PatternBenefit::getBenefit | ( | ) | const |
If the corresponding pattern can match, return its benefit. If the.
Definition at line 25 of file PatternMatch.cpp.
References isImpossibleToMatch().
Referenced by mlir::linalg::populatePadOpVectorizationPatterns().
|
inlinestatic |
Definition at line 43 of file PatternMatch.h.
References PatternBenefit().
Referenced by isImpossibleToMatch().
|
inline |
Definition at line 44 of file PatternMatch.h.
References impossibleToMatch().
Referenced by mlir::PatternApplicator::applyCostModel(), and getBenefit().
|
inline |
Definition at line 53 of file PatternMatch.h.
|
inline |
Definition at line 54 of file PatternMatch.h.
|
inline |
Definition at line 58 of file PatternMatch.h.
|
default |
|
inline |
Definition at line 50 of file PatternMatch.h.
|
inline |
Definition at line 57 of file PatternMatch.h.
|
inline |
Definition at line 59 of file PatternMatch.h.