From d109b8d73ba1aee774e46c8bd8c947513fcac7ca Mon Sep 17 00:00:00 2001 From: Christian Ulmann Date: Mon, 30 Oct 2023 21:54:12 +0000 Subject: [PATCH] [MLIR][ControlFlowToLLVM] Remove typed pointer support This commit removes the support for lowering ControlFlow to LLVM dialect with typed pointers. 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 --- mlir/include/mlir/Conversion/Passes.td | 5 +---- mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp | 1 - mlir/test/Conversion/ControlFlowToLLVM/assert.mlir | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td index cf6e545749ffc..ad756b63e8fad 100644 --- a/mlir/include/mlir/Conversion/Passes.td +++ b/mlir/include/mlir/Conversion/Passes.td @@ -298,10 +298,7 @@ def ConvertControlFlowToLLVMPass : Pass<"convert-cf-to-llvm", "ModuleOp"> { let options = [ Option<"indexBitwidth", "index-bitwidth", "unsigned", /*default=kDeriveIndexBitwidthFromDataLayout*/"0", - "Bitwidth of the index type, 0 to use size of machine word">, - Option<"useOpaquePointers", "use-opaque-pointers", "bool", - /*default=*/"true", "Generate LLVM IR using opaque pointers " - "instead of typed pointers">, + "Bitwidth of the index type, 0 to use size of machine word"> ]; } diff --git a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp index 433d8a01a1ac8..b8e5aec25286d 100644 --- a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp +++ b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp @@ -236,7 +236,6 @@ struct ConvertControlFlowToLLVM LowerToLLVMOptions options(&getContext()); if (indexBitwidth != kDeriveIndexBitwidthFromDataLayout) options.overrideIndexBitwidth(indexBitwidth); - options.useOpaquePointers = useOpaquePointers; LLVMTypeConverter converter(&getContext(), options); mlir::cf::populateControlFlowToLLVMConversionPatterns(converter, patterns); diff --git a/mlir/test/Conversion/ControlFlowToLLVM/assert.mlir b/mlir/test/Conversion/ControlFlowToLLVM/assert.mlir index dc5ba0680acb2..3ec8f1fa1e567 100644 --- a/mlir/test/Conversion/ControlFlowToLLVM/assert.mlir +++ b/mlir/test/Conversion/ControlFlowToLLVM/assert.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-cf-to-llvm='use-opaque-pointers=1' | FileCheck %s +// RUN: mlir-opt %s -convert-cf-to-llvm | FileCheck %s // Same below, but using the `ConvertToLLVMPatternInterface` entry point // and the generic `convert-to-llvm` pass.