[Mlir-commits] [mlir] [mlir] Add insert method for ApplyToEachResultList class (PR #109582)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Sep 22 09:53:27 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Fawdlstty (fawdlstty)
<details>
<summary>Changes</summary>
#<!-- -->94968
---
Full diff: https://github.com/llvm/llvm-project/pull/109582.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h (+6)
``````````diff
diff --git a/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h b/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h
index 43193e4cd4cf63..728a99e4f67661 100644
--- a/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h
+++ b/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h
@@ -1432,6 +1432,12 @@ class ApplyToEachResultList {
void push_back(Attribute attr) { results.push_back(attr); }
void push_back(ApplyToEachResult r) { results.push_back(r); }
+ // Inserts an element to the list.
+ using iterator = SmallVector<ApplyToEachResult>::iterator;
+ void insert(iterator I, Operation *op) { results.insert(I, op); }
+ void insert(iterator I, Attribute attr) { results.insert(I, attr); }
+ void insert(iterator I, ApplyToEachResult r) { results.insert(I, r); }
+
/// Reserves space for `size` elements in the list.
void reserve(unsigned size) { results.reserve(size); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/109582
More information about the Mlir-commits
mailing list