[Mlir-commits] [mlir] [mlir] Remove `printCString()` from RunnerUtils (PR #70197)
Benjamin Maxwell
llvmlistbot at llvm.org
Wed Oct 25 04:41:13 PDT 2023
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/70197
This is now unused and can be replaced with `printString()` from CRunnerUtils or `vector.print str`.
>From 3ff5969d9d474ea6ae2f1ee3b18dbff80f0f492a Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: Wed, 25 Oct 2023 11:23:42 +0000
Subject: [PATCH] [mlir] Remove `printCString()` from RunnerUtils
This is now unused and can be replaced with `printString()` from
CRunnerUtils or `vector.print str`.
---
.../mlir/ExecutionEngine/RunnerUtils.h | 1 -
mlir/lib/ExecutionEngine/RunnerUtils.cpp | 3 ---
mlir/test/mlir-cpu-runner/print.mlir | 19 -------------------
3 files changed, 23 deletions(-)
delete mode 100644 mlir/test/mlir-cpu-runner/print.mlir
diff --git a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
index 56c0983e5f15b5a..f998ed53b3403b4 100644
--- a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
@@ -392,7 +392,6 @@ extern "C" MLIR_RUNNERUTILS_EXPORT void printMemrefF64(int64_t rank, void *ptr);
extern "C" MLIR_RUNNERUTILS_EXPORT void printMemrefInd(int64_t rank, void *ptr);
extern "C" MLIR_RUNNERUTILS_EXPORT void printMemrefC32(int64_t rank, void *ptr);
extern "C" MLIR_RUNNERUTILS_EXPORT void printMemrefC64(int64_t rank, void *ptr);
-extern "C" MLIR_RUNNERUTILS_EXPORT void printCString(char *str);
extern "C" MLIR_RUNNERUTILS_EXPORT void
_mlir_ciface_printMemref0dF32(StridedMemRefType<float, 0> *m);
diff --git a/mlir/lib/ExecutionEngine/RunnerUtils.cpp b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
index 4618866f68a44b7..bbfd3a6b11c2a1b 100644
--- a/mlir/lib/ExecutionEngine/RunnerUtils.cpp
+++ b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
@@ -158,9 +158,6 @@ extern "C" void printMemrefC64(int64_t rank, void *ptr) {
_mlir_ciface_printMemrefC64(&descriptor);
}
-/// Deprecated. This should be unified with printString from CRunnerUtils.
-extern "C" void printCString(char *str) { fputs(str, stdout); }
-
extern "C" void _mlir_ciface_printMemref0dF32(StridedMemRefType<float, 0> *M) {
impl::printMemRef(*M);
}
diff --git a/mlir/test/mlir-cpu-runner/print.mlir b/mlir/test/mlir-cpu-runner/print.mlir
deleted file mode 100644
index e36c7154f03a7b6..000000000000000
--- a/mlir/test/mlir-cpu-runner/print.mlir
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: mlir-opt %s -pass-pipeline="builtin.module(convert-func-to-llvm,reconcile-unrealized-casts)" \
-// RUN: | mlir-cpu-runner -e main -entry-point-result=void \
-// RUN: -shared-libs=%mlir_runner_utils,%mlir_c_runner_utils \
-// RUN: | FileCheck %s
-
-
-llvm.mlir.global internal constant @str_global("String to print\0A")
-llvm.func @printCString(!llvm.ptr<i8>)
-
-func.func @main() {
- %0 = llvm.mlir.addressof @str_global : !llvm.ptr<array<16 x i8>>
- %1 = llvm.mlir.constant(0 : index) : i64
- %2 = llvm.getelementptr %0[%1, %1]
- : (!llvm.ptr<array<16 x i8>>, i64, i64) -> !llvm.ptr<i8>
- llvm.call @printCString(%2) : (!llvm.ptr<i8>) -> ()
- return
-}
-
-// CHECK: String to print
More information about the Mlir-commits
mailing list