Skip to content

Commit 610c761

Browse files
authored
[MLIR][FuncToLLVM] Remove typed pointers from call conversion test pass (#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
1 parent de75008 commit 610c761

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: mlir-opt %s -test-convert-call-op | FileCheck %s
22

3-
// CHECK-LABEL: llvm.func @callee(!llvm.ptr<i8>) -> i32
3+
// CHECK-LABEL: llvm.func @callee(!llvm.ptr) -> i32
44
func.func private @callee(!test.test_type) -> i32
55

66
// CHECK-NEXT: llvm.func @caller() -> i32
@@ -9,6 +9,6 @@ func.func @caller() -> i32 {
99
%out = call @callee(%arg) : (!test.test_type) -> i32
1010
return %out : i32
1111
}
12-
// CHECK-NEXT: [[ARG:%.*]] = llvm.mlir.zero : !llvm.ptr<i8>
12+
// CHECK-NEXT: [[ARG:%.*]] = llvm.mlir.zero : !llvm.ptr
1313
// CHECK-NEXT: [[OUT:%.*]] = llvm.call @callee([[ARG]])
14-
// CHECK-SAME: : (!llvm.ptr<i8>) -> i32
14+
// CHECK-SAME: : (!llvm.ptr) -> i32

mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ struct TestConvertCallOp
4949
ModuleOp m = getOperation();
5050

5151
LowerToLLVMOptions options(m.getContext());
52-
options.useOpaquePointers = false;
5352

5453
// Populate type conversions.
5554
LLVMTypeConverter typeConverter(m.getContext(), options);
5655
typeConverter.addConversion([&](test::TestType type) {
57-
return LLVM::LLVMPointerType::get(IntegerType::get(m.getContext(), 8));
56+
return LLVM::LLVMPointerType::get(m.getContext());
5857
});
5958
typeConverter.addConversion([&](test::SimpleAType type) {
6059
return IntegerType::get(type.getContext(), 42);

0 commit comments

Comments
 (0)