[Mlir-commits] [mlir] 1a6ed4d - [mlir][Vector] Deprecate vector.extractelement/vector.insertelement (#113829)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 19 12:42:10 PST 2025


Author: Kunwar Grover
Date: 2025-02-20T02:12:06+05:30
New Revision: 1a6ed4d06e3c5b05e5ed9873888165c671292b06

URL: https://github.com/llvm/llvm-project/commit/1a6ed4d06e3c5b05e5ed9873888165c671292b06
DIFF: https://github.com/llvm/llvm-project/commit/1a6ed4d06e3c5b05e5ed9873888165c671292b06.diff

LOG: [mlir][Vector] Deprecate vector.extractelement/vector.insertelement (#113829)

See
https://discourse.llvm.org/t/rfc-psa-remove-vector-extractelement-and-vector-insertelement-ops-in-favor-of-vector-extract-and-vector-insert-ops/71116/6
for more information.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index c821e7b1527b4..fbbf817ecff98 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -644,11 +644,13 @@ def Vector_ExtractElementOp :
     Results<(outs AnyType:$result)> {
   let summary = "extractelement operation";
   let description = [{
+    Note: This operation is deprecated. Please use vector.extract insert.
+
     Takes a 0-D or 1-D vector and a optional dynamic index position and
     extracts the scalar at that position.
 
     Note that this instruction resembles vector.extract, but is restricted to
-    0-D and 1-D vectors and relaxed to dynamic indices.
+    0-D and 1-D vectors.
     If the vector is 0-D, the position must be std::nullopt.
 
 
@@ -834,11 +836,13 @@ def Vector_InsertElementOp :
      Results<(outs AnyVectorOfAnyRank:$result)> {
   let summary = "insertelement operation";
   let description = [{
+    Note: This operation is deprecated. Please use vector.insert instead.
+
     Takes a scalar source, a 0-D or 1-D destination vector and a dynamic index
     position and inserts the source into the destination at the proper position.
 
     Note that this instruction resembles vector.insert, but is restricted to 0-D
-    and 1-D vectors and relaxed to dynamic indices.
+    and 1-D vectors.
 
     It is meant to be closer to LLVM's version:
     https://llvm.org/docs/LangRef.html#insertelement-instruction


        


More information about the Mlir-commits mailing list