11#include " mlir/IR/PatternMatch.h"
22#include " llvm/Support/Debug.h"
33
4- #define DEBUG_TYPE " generate- pattern-catalog "
4+ #define DEBUG_TYPE " pattern-logging-listener "
55
66using namespace mlir ;
77
8- static constexpr StringLiteral catalogPrefix = " CatalogingListener : " ;
8+ static constexpr StringLiteral catalogPrefix = " PatternLoggingListener : " ;
99
10- void RewriterBase::CatalogingListener ::notifyOperationInserted (
10+ void RewriterBase::PatternLoggingListener ::notifyOperationInserted (
1111 Operation *op, InsertPoint previous) {
1212 LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
1313 << " | notifyOperationInserted"
1414 << " | " << op->getName () << " \n " );
1515 ForwardingListener::notifyOperationInserted (op, previous);
1616}
1717
18- void RewriterBase::CatalogingListener ::notifyOperationModified (Operation *op) {
18+ void RewriterBase::PatternLoggingListener ::notifyOperationModified (Operation *op) {
1919 LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
2020 << " | notifyOperationModified"
2121 << " | " << op->getName () << " \n " );
2222 ForwardingListener::notifyOperationModified (op);
2323}
2424
25- void RewriterBase::CatalogingListener ::notifyOperationReplaced (
25+ void RewriterBase::PatternLoggingListener ::notifyOperationReplaced (
2626 Operation *op, Operation *newOp) {
2727 LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
2828 << " | notifyOperationReplaced (with op)"
@@ -31,22 +31,22 @@ void RewriterBase::CatalogingListener::notifyOperationReplaced(
3131 ForwardingListener::notifyOperationReplaced (op, newOp);
3232}
3333
34- void RewriterBase::CatalogingListener ::notifyOperationReplaced (
34+ void RewriterBase::PatternLoggingListener ::notifyOperationReplaced (
3535 Operation *op, ValueRange replacement) {
3636 LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
3737 << " | notifyOperationReplaced (with values)"
3838 << " | " << op->getName () << " \n " );
3939 ForwardingListener::notifyOperationReplaced (op, replacement);
4040}
4141
42- void RewriterBase::CatalogingListener ::notifyOperationErased (Operation *op) {
42+ void RewriterBase::PatternLoggingListener ::notifyOperationErased (Operation *op) {
4343 LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
4444 << " | notifyOperationErased"
4545 << " | " << op->getName () << " \n " );
4646 ForwardingListener::notifyOperationErased (op);
4747}
4848
49- void RewriterBase::CatalogingListener ::notifyPatternBegin (
49+ void RewriterBase::PatternLoggingListener ::notifyPatternBegin (
5050 const Pattern &pattern, Operation *op) {
5151 LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
5252 << " | notifyPatternBegin"
0 commit comments