5
5
6
6
using namespace mlir ;
7
7
8
+ static constexpr StringLiteral catalogPrefix = " CatalogingListener: " ;
9
+
8
10
void RewriterBase::CatalogingListener::notifyOperationInserted (
9
11
Operation *op, InsertPoint previous) {
10
- LLVM_DEBUG (llvm::dbgs () << patternName << " | notifyOperationInserted"
12
+ LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
13
+ << " | notifyOperationInserted"
11
14
<< " | " << op->getName () << " \n " );
12
15
ForwardingListener::notifyOperationInserted (op, previous);
13
16
}
14
17
15
18
void RewriterBase::CatalogingListener::notifyOperationModified (Operation *op) {
16
- LLVM_DEBUG (llvm::dbgs () << patternName << " | notifyOperationModified"
19
+ LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
20
+ << " | notifyOperationModified"
17
21
<< " | " << op->getName () << " \n " );
18
22
ForwardingListener::notifyOperationModified (op);
19
23
}
20
24
21
25
void RewriterBase::CatalogingListener::notifyOperationReplaced (
22
26
Operation *op, Operation *newOp) {
23
- LLVM_DEBUG (llvm::dbgs () << patternName
27
+ LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
24
28
<< " | notifyOperationReplaced (with op)"
25
29
<< " | " << op->getName () << " | " << newOp->getName ()
26
30
<< " \n " );
@@ -29,21 +33,23 @@ void RewriterBase::CatalogingListener::notifyOperationReplaced(
29
33
30
34
void RewriterBase::CatalogingListener::notifyOperationReplaced (
31
35
Operation *op, ValueRange replacement) {
32
- LLVM_DEBUG (llvm::dbgs () << patternName
36
+ LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
33
37
<< " | notifyOperationReplaced (with values)"
34
38
<< " | " << op->getName () << " \n " );
35
39
ForwardingListener::notifyOperationReplaced (op, replacement);
36
40
}
37
41
38
42
void RewriterBase::CatalogingListener::notifyOperationErased (Operation *op) {
39
- LLVM_DEBUG (llvm::dbgs () << patternName << " | notifyOperationErased"
43
+ LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
44
+ << " | notifyOperationErased"
40
45
<< " | " << op->getName () << " \n " );
41
46
ForwardingListener::notifyOperationErased (op);
42
47
}
43
48
44
49
void RewriterBase::CatalogingListener::notifyPatternBegin (
45
50
const Pattern &pattern, Operation *op) {
46
- LLVM_DEBUG (llvm::dbgs () << patternName << " | notifyPatternBegin"
51
+ LLVM_DEBUG (llvm::dbgs () << catalogPrefix << patternName
52
+ << " | notifyPatternBegin"
47
53
<< " | " << op->getName () << " \n " );
48
54
ForwardingListener::notifyPatternBegin (pattern, op);
49
55
}
0 commit comments