Remove `-action` suffix from the tag defining an Action: it is redundant here
authorMehdi Amini <joker.eph@gmail.com>
Sun, 23 Apr 2023 22:07:51 +0000 (16:07 -0600)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 24 Apr 2023 05:06:27 +0000 (23:06 -0600)
Differential Revision: https://reviews.llvm.org/D149036

mlir/include/mlir/Rewrite/PatternApplicator.h
mlir/lib/Pass/PassDetail.h
mlir/test/Pass/action-logging-filter.mlir
mlir/test/Pass/action-logging.mlir

index 41ec95a..0bdc00c 100644 (file)
@@ -32,7 +32,7 @@ public:
   using Base = tracing::ActionImpl<ApplyPatternAction>;
   ApplyPatternAction(ArrayRef<IRUnit> irUnits, const Pattern &pattern)
       : Base(irUnits), pattern(pattern) {}
-  static constexpr StringLiteral tag = "apply-pattern-action";
+  static constexpr StringLiteral tag = "apply-pattern";
   static constexpr StringLiteral desc =
       "Encapsulate the application of rewrite patterns";
 
index ca60cf2..35f1edd 100644 (file)
@@ -21,7 +21,7 @@ struct PassExecutionAction : public tracing::ActionImpl<PassExecutionAction> {
   using Base = tracing::ActionImpl<PassExecutionAction>;
   PassExecutionAction(ArrayRef<IRUnit> irUnits, const Pass &pass)
       : Base(irUnits), pass(pass) {}
-  static constexpr StringLiteral tag = "pass-execution-action";
+  static constexpr StringLiteral tag = "pass-execution";
   void print(raw_ostream &os) const override;
   const Pass &getPass() const { return pass; }
   Operation *getOp() const {
index e565b18..c853a08 100644 (file)
@@ -20,12 +20,12 @@ func.func @c() {
 // Specify the current file as filter, expect to see all actions.
 // RUN: mlir-opt %s --log-mlir-actions-filter=%s --log-actions-to=- -pass-pipeline="builtin.module(func.func(canonicalize))" -o %t --mlir-disable-threading | FileCheck %s
 
-// CHECK: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action`  running `Canonicalizer` on Operation `func.func` (func.func @a() {...}
-// CHECK-NEXT: [thread {{.*}}] completed `pass-execution-action`
-// CHECK-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action`  running `Canonicalizer` on Operation `func.func` (func.func @b() {...}
-// CHECK-NEXT: [thread {{.*}}] completed `pass-execution-action`
-// CHECK-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action`  running `Canonicalizer` on Operation `func.func` (func.func @c() {...}
-// CHECK-NEXT: [thread {{.*}}] completed `pass-execution-action`
+// CHECK: [thread {{.*}}] begins (no breakpoint) Action `pass-execution`  running `Canonicalizer` on Operation `func.func` (func.func @a() {...}
+// CHECK-NEXT: [thread {{.*}}] completed `pass-execution`
+// CHECK-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution`  running `Canonicalizer` on Operation `func.func` (func.func @b() {...}
+// CHECK-NEXT: [thread {{.*}}] completed `pass-execution`
+// CHECK-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution`  running `Canonicalizer` on Operation `func.func` (func.func @c() {...}
+// CHECK-NEXT: [thread {{.*}}] completed `pass-execution`
 
 ////////////////////////////////////
 /// 2. No match
@@ -46,15 +46,15 @@ func.func @c() {
 
 // CHECK-SECOND-NOT: @a
 // CHECK-SECOND-NOT: @c
-// CHECK-SECOND: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action`  running `Canonicalizer` on Operation `func.func` (func.func @b() {...}
-// CHECK-SECOND-NEXT: [thread {{.*}}] completed `pass-execution-action`
+// CHECK-SECOND: [thread {{.*}}] begins (no breakpoint) Action `pass-execution`  running `Canonicalizer` on Operation `func.func` (func.func @b() {...}
+// CHECK-SECOND-NEXT: [thread {{.*}}] completed `pass-execution`
 
 // Filter the first and third functions
 // RUN: mlir-opt %s --log-mlir-actions-filter=%s:4,%s:12 --log-actions-to=- -pass-pipeline="builtin.module(func.func(canonicalize))" -o %t --mlir-disable-threading | FileCheck %s  --check-prefix=CHECK-FIRST-THIRD
 
 // CHECK-FIRST-THIRD-NOT: Canonicalizer
-// CHECK-FIRST-THIRD: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action`  running `Canonicalizer` on Operation `func.func` (func.func @a() {...}
-// CHECK-FIRST-THIRD-NEXT: [thread {{.*}}] completed `pass-execution-action`
-// CHECK-FIRST-THIRD-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action`  running `Canonicalizer` on Operation `func.func` (func.func @c() {...}
-// CHECK-FIRST-THIRD-NEXT: [thread {{.*}}] completed `pass-execution-action`
+// CHECK-FIRST-THIRD: [thread {{.*}}] begins (no breakpoint) Action `pass-execution`  running `Canonicalizer` on Operation `func.func` (func.func @a() {...}
+// CHECK-FIRST-THIRD-NEXT: [thread {{.*}}] completed `pass-execution`
+// CHECK-FIRST-THIRD-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution`  running `Canonicalizer` on Operation `func.func` (func.func @c() {...}
+// CHECK-FIRST-THIRD-NEXT: [thread {{.*}}] completed `pass-execution`
 // CHECK-FIRST-THIRD-NOT: Canonicalizer
index d10c64c..5ceb7eb 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: mlir-opt %s --log-actions-to=- -canonicalize -test-module-pass | FileCheck %s
 
-// CHECK: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action` running `Canonicalizer` on Operation `builtin.module` (module {...}
-// CHECK-NEXT: [thread {{.*}}] completed `pass-execution-action`
-// CHECK-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution-action`  running `{{.*}}TestModulePass` on Operation `builtin.module` (module {...}
-// CHECK-NEXT: [thread {{.*}}] completed `pass-execution-action`
+// CHECK: [thread {{.*}}] begins (no breakpoint) Action `pass-execution` running `Canonicalizer` on Operation `builtin.module` (module {...}
+// CHECK-NEXT: [thread {{.*}}] completed `pass-execution`
+// CHECK-NEXT: [thread {{.*}}] begins (no breakpoint) Action `pass-execution`  running `{{.*}}TestModulePass` on Operation `builtin.module` (module {...}
+// CHECK-NEXT: [thread {{.*}}] completed `pass-execution`
 // CHECK-NOT: Action