Skip to content

Commit 4fed3d3

Browse files
authored
[MLIR][ControlFlowToLLVM] Remove typed pointer support (#70733)
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
1 parent 749f370 commit 4fed3d3

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

mlir/include/mlir/Conversion/Passes.td

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,7 @@ def ConvertControlFlowToLLVMPass : Pass<"convert-cf-to-llvm", "ModuleOp"> {
293293
let options = [
294294
Option<"indexBitwidth", "index-bitwidth", "unsigned",
295295
/*default=kDeriveIndexBitwidthFromDataLayout*/"0",
296-
"Bitwidth of the index type, 0 to use size of machine word">,
297-
Option<"useOpaquePointers", "use-opaque-pointers", "bool",
298-
/*default=*/"true", "Generate LLVM IR using opaque pointers "
299-
"instead of typed pointers">,
296+
"Bitwidth of the index type, 0 to use size of machine word">
300297
];
301298
}
302299

mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ struct ConvertControlFlowToLLVM
236236
LowerToLLVMOptions options(&getContext());
237237
if (indexBitwidth != kDeriveIndexBitwidthFromDataLayout)
238238
options.overrideIndexBitwidth(indexBitwidth);
239-
options.useOpaquePointers = useOpaquePointers;
240239

241240
LLVMTypeConverter converter(&getContext(), options);
242241
mlir::cf::populateControlFlowToLLVMConversionPatterns(converter, patterns);

mlir/test/Conversion/ControlFlowToLLVM/assert.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt %s -convert-cf-to-llvm='use-opaque-pointers=1' | FileCheck %s
1+
// RUN: mlir-opt %s -convert-cf-to-llvm | FileCheck %s
22

33
// Same below, but using the `ConvertToLLVMPatternInterface` entry point
44
// and the generic `convert-to-llvm` pass.

0 commit comments

Comments
 (0)