[Mlir-commits] [mlir] 6343b4e - [mlir] Apply ClangTidy performance finding

Adrian Kuegel llvmlistbot at llvm.org
Sun Jan 7 23:48:09 PST 2024


Author: Adrian Kuegel
Date: 2024-01-08T07:47:14Z
New Revision: 6343b4e48205fe5772f707b9023e8a57c95154a9

URL: https://github.com/llvm/llvm-project/commit/6343b4e48205fe5772f707b9023e8a57c95154a9
DIFF: https://github.com/llvm/llvm-project/commit/6343b4e48205fe5772f707b9023e8a57c95154a9.diff

LOG: [mlir] Apply ClangTidy performance finding

- Use '\n' instead of std::endl;

https://clang.llvm.org/extra/clang-tidy/checks/performance/avoid-endl.html

Added: 
    

Modified: 
    mlir/include/mlir/ExecutionEngine/RunnerUtils.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
index b426465c5192a7..72001172c426ed 100644
--- a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
@@ -217,14 +217,14 @@ void printMemRefShape(UnrankedMemRefType<T> &m) {
 template <typename T>
 void printMemRef(const DynamicMemRefType<T> &m) {
   printMemRefMetaData(std::cout, m);
-  std::cout << " data = " << std::endl;
+  std::cout << " data = \n";
   if (m.rank == 0)
     std::cout << "[";
   MemRefDataPrinter<T>::print(std::cout, m.data, m.rank, m.rank, m.offset,
                               m.sizes, m.strides);
   if (m.rank == 0)
     std::cout << "]";
-  std::cout << std::endl;
+  std::cout << '\n';
 }
 
 template <typename T, int N>


        


More information about the Mlir-commits mailing list