[MLIR][SparseTensor] Introduce opaque pointers in LLVM dialect lowering (#70570)

This commit changes the SparseTensor LLVM dialect lowering from using
`llvm.ptr<i8>` to `llvm.ptr`. This change ensures that the lowering now
properly relies on opaque pointers, instead of working with already type
erased i8 pointers.
This commit is contained in:
Christian Ulmann
2023-10-31 07:34:49 +01:00
committed by GitHub
parent a396fb247e
commit dcae289d3a
10 changed files with 123 additions and 123 deletions

View File

@@ -42,7 +42,7 @@ namespace {
/// Maps each sparse tensor type to an opaque pointer.
static std::optional<Type> convertSparseTensorTypes(Type type) {
if (getSparseTensorEncoding(type) != nullptr)
return LLVM::LLVMPointerType::get(IntegerType::get(type.getContext(), 8));
return LLVM::LLVMPointerType::get(type.getContext());
return std::nullopt;
}