Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/Rewrite/PatternApplicator.h
Show All 31 Lines | public: | ||||
using Base = tracing::ActionImpl<ApplyPatternAction>; | using Base = tracing::ActionImpl<ApplyPatternAction>; | ||||
ApplyPatternAction(ArrayRef<IRUnit> irUnits, const Pattern &pattern) | ApplyPatternAction(ArrayRef<IRUnit> irUnits, const Pattern &pattern) | ||||
: Base(irUnits), pattern(pattern) {} | : Base(irUnits), pattern(pattern) {} | ||||
static constexpr StringLiteral tag = "apply-pattern"; | static constexpr StringLiteral tag = "apply-pattern"; | ||||
static constexpr StringLiteral desc = | static constexpr StringLiteral desc = | ||||
"Encapsulate the application of rewrite patterns"; | "Encapsulate the application of rewrite patterns"; | ||||
void print(raw_ostream &os) const override { | void print(raw_ostream &os) const override { | ||||
os << "`" << tag << "`\n" | os << "`" << tag << " pattern: " << pattern.getDebugName(); | ||||
<< " pattern: " << pattern.getDebugName() << '\n'; | |||||
} | } | ||||
private: | private: | ||||
const Pattern &pattern; | const Pattern &pattern; | ||||
}; | }; | ||||
/// This class manages the application of a group of rewrite patterns, with a | /// This class manages the application of a group of rewrite patterns, with a | ||||
/// user-provided cost model. | /// user-provided cost model. | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |