[Mlir-commits] [mlir] 7de0804 - Make mlir-opt --show-dialects option print on a single line
Mehdi Amini
llvmlistbot at llvm.org
Tue Mar 7 16:18:27 PST 2023
Author: Mehdi Amini
Date: 2023-03-08T01:17:51+01:00
New Revision: 7de0804ea3290e5e43ce38567b4056a34ccad551
URL: https://github.com/llvm/llvm-project/commit/7de0804ea3290e5e43ce38567b4056a34ccad551
DIFF: https://github.com/llvm/llvm-project/commit/7de0804ea3290e5e43ce38567b4056a34ccad551.diff
LOG: Make mlir-opt --show-dialects option print on a single line
Differential Revision: https://reviews.llvm.org/D145398
Added:
Modified:
mlir/examples/standalone/test/Standalone/standalone-opt.mlir
mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
mlir/test/mlir-opt/commandline.mlir
Removed:
################################################################################
diff --git a/mlir/examples/standalone/test/Standalone/standalone-opt.mlir b/mlir/examples/standalone/test/Standalone/standalone-opt.mlir
index 1a78a9d8cb9ec..101f9015f393d 100644
--- a/mlir/examples/standalone/test/Standalone/standalone-opt.mlir
+++ b/mlir/examples/standalone/test/Standalone/standalone-opt.mlir
@@ -1,3 +1,3 @@
// RUN: standalone-opt --show-dialects | FileCheck %s
// CHECK: Available Dialects:
-// CHECK: standalone
+// CHECK-SAME: standalone
diff --git a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
index fb4fbee541424..d1c56375e3fda 100644
--- a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
+++ b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
@@ -238,8 +238,8 @@ LogicalResult mlir::MlirOptMain(llvm::raw_ostream &outputStream,
DialectRegistry ®istry,
const MlirOptMainConfig &config) {
if (config.shouldShowDialects()) {
- llvm::outs() << "Available Dialects:\n";
- interleave(registry.getDialectNames(), llvm::outs(), "\n");
+ llvm::outs() << "Available Dialects: ";
+ interleave(registry.getDialectNames(), llvm::outs(), ",");
llvm::outs() << "\n";
}
diff --git a/mlir/test/mlir-opt/commandline.mlir b/mlir/test/mlir-opt/commandline.mlir
index b953155e22539..70766498b5d84 100644
--- a/mlir/test/mlir-opt/commandline.mlir
+++ b/mlir/test/mlir-opt/commandline.mlir
@@ -1,45 +1,45 @@
// RUN: echo "" | mlir-opt --show-dialects | FileCheck %s
// CHECK: Available Dialects:
-// CHECK-NEXT: acc
-// CHECK-NEXT: affine
-// CHECK-NEXT: amdgpu
-// CHECK-NEXT: amx
-// CHECK-NEXT: arith
-// CHECK-NEXT: arm_neon
-// CHECK-NEXT: arm_sve
-// CHECK-NEXT: async
-// CHECK-NEXT: bufferization
-// CHECK-NEXT: builtin
-// CHECK-NEXT: cf
-// CHECK-NEXT: complex
-// CHECK-NEXT: dlti
-// CHECK-NEXT: emitc
-// CHECK-NEXT: func
-// CHECK-NEXT: gpu
-// CHECK-NEXT: index
-// CHECK-NEXT: linalg
-// CHECK-NEXT: llvm
-// CHECK-NEXT: math
-// CHECK-NEXT: memref
-// CHECK-NEXT: ml_program
-// CHECK-NEXT: nvgpu
-// CHECK-NEXT: nvvm
-// CHECK-NEXT: omp
-// CHECK-NEXT: pdl
-// CHECK-NEXT: pdl_interp
-// CHECK-NEXT: quant
-// CHECK-NEXT: rocdl
-// CHECK-NEXT: scf
-// CHECK-NEXT: shape
-// CHECK-NEXT: sparse_tensor
-// CHECK-NEXT: spirv
-// CHECK-NEXT: tensor
-// CHECK-NEXT: test
-// CHECK-NEXT: test_dyn
-// CHECK-NEXT: tosa
-// CHECK-NEXT: transform
-// CHECK-NEXT: vector
-// CHECK-NEXT: x86vector
+// CHECK-SAME: acc
+// CHECK-SAME: affine
+// CHECK-SAME: amdgpu
+// CHECK-SAME: amx
+// CHECK-SAME: arith
+// CHECK-SAME: arm_neon
+// CHECK-SAME: arm_sve
+// CHECK-SAME: async
+// CHECK-SAME: bufferization
+// CHECK-SAME: builtin
+// CHECK-SAME: cf
+// CHECK-SAME: complex
+// CHECK-SAME: dlti
+// CHECK-SAME: emitc
+// CHECK-SAME: func
+// CHECK-SAME: gpu
+// CHECK-SAME: index
+// CHECK-SAME: linalg
+// CHECK-SAME: llvm
+// CHECK-SAME: math
+// CHECK-SAME: memref
+// CHECK-SAME: ml_program
+// CHECK-SAME: nvgpu
+// CHECK-SAME: nvvm
+// CHECK-SAME: omp
+// CHECK-SAME: pdl
+// CHECK-SAME: pdl_interp
+// CHECK-SAME: quant
+// CHECK-SAME: rocdl
+// CHECK-SAME: scf
+// CHECK-SAME: shape
+// CHECK-SAME: sparse_tensor
+// CHECK-SAME: spirv
+// CHECK-SAME: tensor
+// CHECK-SAME: test
+// CHECK-SAME: test_dyn
+// CHECK-SAME: tosa
+// CHECK-SAME: transform
+// CHECK-SAME: vector
+// CHECK-SAME: x86vector
// RUN: mlir-opt --help-hidden | FileCheck %s -check-prefix=CHECK-HELP
// CHECK-HELP: -p - Alias for --pass-pipeline
More information about the Mlir-commits
mailing list