[Mlir-commits] [mlir] [mlir] Enhance TimingManager Printing Flexibility (PR #85821)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Mar 19 10:01:45 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 66125ad8e9978e6fdec0e1c3ff83e717eff07aca bb3a78cdf524cbad3d050e66474a34c0b6d97e72 -- mlir/include/mlir/Support/Timing.h mlir/lib/Support/Timing.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Support/Timing.cpp b/mlir/lib/Support/Timing.cpp
index 90484cfb2e..d1e56aac20 100644
--- a/mlir/lib/Support/Timing.cpp
+++ b/mlir/lib/Support/Timing.cpp
@@ -196,14 +196,10 @@ class OutputJsonStrategy : public OutputStrategy {
 public:
   OutputJsonStrategy(raw_ostream &os) : OutputStrategy(os) {}
 
-  void printHeader(const TimeRecord &total) override {
-    os << "["
-       << "\n";
-  }
+  void printHeader(const TimeRecord &total) override { os << "[" << "\n"; }
 
   void printFooter() override {
-    os << "]"
-       << "\n";
+    os << "]" << "\n";
     os.flush();
   }
 
@@ -226,8 +222,7 @@ public:
                       const TimeRecord &total, bool lastEntry) override {
     os << "{";
     printTime(time, total);
-    os << ", \"name\": "
-       << "\"" << name << "\"";
+    os << ", \"name\": " << "\"" << name << "\"";
     os << "}";
     if (!lastEntry)
       os << ",";
@@ -238,10 +233,8 @@ public:
                       const TimeRecord &total) override {
     os << "{";
     printTime(time, total);
-    os << ", \"name\": "
-       << "\"" << name << "\"";
-    os << ", \"passes\": ["
-       << "\n";
+    os << ", \"name\": " << "\"" << name << "\"";
+    os << ", \"passes\": [" << "\n";
   }
 
   void printTreeEntryEnd(bool lastEntry) override {

``````````

</details>


https://github.com/llvm/llvm-project/pull/85821


More information about the Mlir-commits mailing list