[Mlir-commits] [mlir] [MLIR][LLVM] Remove typed pointers from the LLVM dialect (PR #71285)

Tobias Gysi llvmlistbot at llvm.org
Sat Nov 4 12:43:43 PDT 2023


================
@@ -78,13 +78,7 @@ LLVMTypeConverter::LLVMTypeConverter(MLIRContext *ctx,
 
   // LLVM container types may (recursively) contain other types that must be
   // converted even when the outer type is compatible.
-  addConversion([&](LLVM::LLVMPointerType type) -> std::optional<Type> {
-    if (type.isOpaque())
-      return type;
-    if (auto pointee = convertType(type.getElementType()))
-      return LLVM::LLVMPointerType::get(pointee, type.getAddressSpace());
-    return std::nullopt;
-  });
+  addConversion([&](LLVM::LLVMPointerType type) { return type; });
----------------
gysit wrote:

Is it possible that this could be removed? I would expect an LLVMPointer is also an LLVM compatible type and the special casing due to the nested type conversion should not be necessary anymore.

https://github.com/llvm/llvm-project/pull/71285


More information about the Mlir-commits mailing list