Skip to content

Commit 02f9cf9

Browse files
committed
[MLIR] Remove LLVM typed pointer support
This breaks lowering to typed pointers, and forces import to always use opaque pointers. This has no effect on MLIR-level typed pointer support in the LLVMIR dialect.
1 parent 35ca649 commit 02f9cf9

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,7 @@ class TypeFromLLVMIRTranslatorImpl {
9797

9898
/// Translates the given pointer type.
9999
Type translate(llvm::PointerType *type) {
100-
if (type->isOpaque())
101-
return LLVM::LLVMPointerType::get(&context, type->getAddressSpace());
102-
103-
return LLVM::LLVMPointerType::get(
104-
translateType(type->getNonOpaquePointerElementType()),
105-
type->getAddressSpace());
100+
return LLVM::LLVMPointerType::get(&context, type->getAddressSpace());
106101
}
107102

108103
/// Translates the given structure type.

mlir/lib/Target/LLVMIR/TypeToLLVM.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ class TypeToLLVMIRTranslatorImpl {
106106

107107
/// Translates the given pointer type.
108108
llvm::Type *translate(LLVM::LLVMPointerType type) {
109-
if (type.isOpaque())
110-
return llvm::PointerType::get(context, type.getAddressSpace());
111-
return llvm::PointerType::get(translateType(type.getElementType()),
112-
type.getAddressSpace());
109+
return llvm::PointerType::get(context, type.getAddressSpace());
113110
}
114111

115112
/// Translates the given structure type, supports both identified and literal

0 commit comments

Comments
 (0)