[Mlir-commits] [mlir] [LLVM][FuncToLLVM] Remove typed pointers from call conversion test pass (PR #71107)
Christian Ulmann
llvmlistbot at llvm.org
Thu Nov 2 13:50:52 PDT 2023
https://github.com/Dinistro created https://github.com/llvm/llvm-project/pull/71107
This commit removes typed pointers from the Func to LLVM test pass Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect.
Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
>From 9ada97afd81b6d8401984339718a2fee4eae8950 Mon Sep 17 00:00:00 2001
From: Christian Ulmann <christianulmann at gmail.com>
Date: Thu, 2 Nov 2023 21:46:48 +0100
Subject: [PATCH] [LLVM][FuncToLLVM] Remove typed pointers from call conversion
test pass
This commit removes typed pointers from the Func to LLVM test pass
Typed pointers have been deprecated for a while now and it's planned to
soon remove them from the LLVM dialect.
Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
---
mlir/test/Transforms/test-convert-call-op.mlir | 6 +++---
mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp | 3 +--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/mlir/test/Transforms/test-convert-call-op.mlir b/mlir/test/Transforms/test-convert-call-op.mlir
index dd7924edc88b865..d2788a72abd3bfe 100644
--- a/mlir/test/Transforms/test-convert-call-op.mlir
+++ b/mlir/test/Transforms/test-convert-call-op.mlir
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s -test-convert-call-op | FileCheck %s
-// CHECK-LABEL: llvm.func @callee(!llvm.ptr<i8>) -> i32
+// CHECK-LABEL: llvm.func @callee(!llvm.ptr) -> i32
func.func private @callee(!test.test_type) -> i32
// CHECK-NEXT: llvm.func @caller() -> i32
@@ -9,6 +9,6 @@ func.func @caller() -> i32 {
%out = call @callee(%arg) : (!test.test_type) -> i32
return %out : i32
}
-// CHECK-NEXT: [[ARG:%.*]] = llvm.mlir.zero : !llvm.ptr<i8>
+// CHECK-NEXT: [[ARG:%.*]] = llvm.mlir.zero : !llvm.ptr
// CHECK-NEXT: [[OUT:%.*]] = llvm.call @callee([[ARG]])
-// CHECK-SAME: : (!llvm.ptr<i8>) -> i32
+// CHECK-SAME: : (!llvm.ptr) -> i32
diff --git a/mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp b/mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp
index 9b3a1534a598eea..5e17779660f3925 100644
--- a/mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp
+++ b/mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp
@@ -49,12 +49,11 @@ struct TestConvertCallOp
ModuleOp m = getOperation();
LowerToLLVMOptions options(m.getContext());
- options.useOpaquePointers = false;
// Populate type conversions.
LLVMTypeConverter typeConverter(m.getContext(), options);
typeConverter.addConversion([&](test::TestType type) {
- return LLVM::LLVMPointerType::get(IntegerType::get(m.getContext(), 8));
+ return LLVM::LLVMPointerType::get(m.getContext());
});
typeConverter.addConversion([&](test::SimpleAType type) {
return IntegerType::get(type.getContext(), 42);
More information about the Mlir-commits
mailing list