[Mlir-commits] [mlir] 35649c6 - [MLIR][LLVM] Deprecate typed pointer operation builder (#70576)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Oct 29 01:40:19 PDT 2023


Author: Christian Ulmann
Date: 2023-10-29T09:40:15+01:00
New Revision: 35649c639cd3780652156f8aaca610d0a5f578b3

URL: https://github.com/llvm/llvm-project/commit/35649c639cd3780652156f8aaca610d0a5f578b3
DIFF: https://github.com/llvm/llvm-project/commit/35649c639cd3780652156f8aaca610d0a5f578b3.diff

LOG: [MLIR][LLVM] Deprecate typed pointer operation builder (#70576)

This commit deprecates LLVM dialect builders that expect typed pointers.
In the process of removing typed pointers from the LLVM dialect, these
builders will eventually be removed.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
index 2a572ab4de706a3..638c31b39682ea6 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -210,7 +210,8 @@ def LLVM_AllocaOp : LLVM_Op<"alloca",
       TypeAttr::get(allocatedType), allocaInst->isUsedWithInAlloca());
   }];
   let builders = [
-    OpBuilder<(ins "Type":$resultType, "Value":$arraySize,
+    DeprecatedOpBuilder<"the usage of typed pointers is deprecated",
+               (ins "Type":$resultType, "Value":$arraySize,
                "unsigned":$alignment),
     [{
       assert(!::llvm::cast<LLVMPointerType>(resultType).isOpaque() &&
@@ -281,10 +282,12 @@ def LLVM_GEPOp : LLVM_Op<"getelementptr", [Pure,
     OpBuilder<(ins "Type":$resultType, "Type":$basePtrType, "Value":$basePtr,
                "ValueRange":$indices, CArg<"bool", "false">:$inbounds,
                CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
-    OpBuilder<(ins "Type":$resultType, "Value":$basePtr,
+    DeprecatedOpBuilder<"the usage of typed pointers is deprecated",
+               (ins "Type":$resultType, "Value":$basePtr,
                "ValueRange":$indices, CArg<"bool", "false">:$inbounds,
                CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
-    OpBuilder<(ins "Type":$resultType, "Value":$basePtr,
+    DeprecatedOpBuilder<"the usage of typed pointers is deprecated",
+               (ins "Type":$resultType, "Value":$basePtr,
                "ArrayRef<GEPArg>":$indices, CArg<"bool", "false">:$inbounds,
                CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
     OpBuilder<(ins "Type":$resultType, "Type":$basePtrType, "Value":$basePtr,
@@ -388,7 +391,8 @@ def LLVM_LoadOp : LLVM_MemAccessOpBase<"load",
         getLLVMSyncScope(loadInst));
   }];
   let builders = [
-    OpBuilder<(ins "Value":$addr, CArg<"unsigned", "0">:$alignment,
+    DeprecatedOpBuilder<"the usage of typed pointers is deprecated",
+      (ins "Value":$addr, CArg<"unsigned", "0">:$alignment,
       CArg<"bool", "false">:$isVolatile, CArg<"bool", "false">:$isNonTemporal)>,
     OpBuilder<(ins "Type":$type, "Value":$addr,
       CArg<"unsigned", "0">:$alignment, CArg<"bool", "false">:$isVolatile,


        


More information about the Mlir-commits mailing list