Skip to content

[MLIR][FuncToLLVM] Remove typed pointers from call conversion test pass #71107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

Dinistro
Copy link
Contributor

@Dinistro Dinistro commented Nov 2, 2023

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

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
@Dinistro Dinistro requested a review from zero9178 November 2, 2023 20:50
@llvmbot llvmbot added the mlir label Nov 2, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 2, 2023

@llvm/pr-subscribers-mlir

Author: Christian Ulmann (Dinistro)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/71107.diff

2 Files Affected:

  • (modified) mlir/test/Transforms/test-convert-call-op.mlir (+3-3)
  • (modified) mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp (+1-2)
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);

@Dinistro Dinistro changed the title [LLVM][FuncToLLVM] Remove typed pointers from call conversion test pass [MLIR][FuncToLLVM] Remove typed pointers from call conversion test pass Nov 2, 2023
Copy link
Member

@zero9178 zero9178 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Dinistro Dinistro merged commit 610c761 into llvm:main Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants