[Mlir-commits] [mlir] 7130503 - [LoopOps] Return ArrayRefs from accessors instead of iterator_ranges

Benjamin Kramer llvmlistbot at llvm.org
Fri Apr 3 08:15:13 PDT 2020


Author: Benjamin Kramer
Date: 2020-04-03T17:13:22+02:00
New Revision: 71305033d11564fe9c19e8e40200680daae41e89

URL: https://github.com/llvm/llvm-project/commit/71305033d11564fe9c19e8e40200680daae41e89
DIFF: https://github.com/llvm/llvm-project/commit/71305033d11564fe9c19e8e40200680daae41e89.diff

LOG: [LoopOps] Return ArrayRefs from accessors instead of iterator_ranges

Same funcitonality, but a bit friendlier for users passing it along to
APIs that take ArrayRefs.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/LoopOps/LoopOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/LoopOps/LoopOps.td b/mlir/include/mlir/Dialect/LoopOps/LoopOps.td
index e202a4013a19..c51bf6f3c7b9 100644
--- a/mlir/include/mlir/Dialect/LoopOps/LoopOps.td
+++ b/mlir/include/mlir/Dialect/LoopOps/LoopOps.td
@@ -142,10 +142,10 @@ def ForOp : Loop_Op<"for",
     OpBuilder getBodyBuilder() {
       return OpBuilder(getBody(), std::prev(getBody()->end()));
     }
-    iterator_range<Block::args_iterator> getRegionIterArgs() {
+    Block::BlockArgListType getRegionIterArgs() {
       return getBody()->getArguments().drop_front();
     }
-    iterator_range<Operation::operand_iterator> getIterOperands() {
+    Operation::operand_range getIterOperands() {
       return getOperands().drop_front(getNumControlOperands());
     }
 
@@ -313,7 +313,7 @@ def ParallelOp : Loop_Op<"parallel",
     unsigned getNumInductionVars() {
       return getBody()->getNumArguments();
     }
-    iterator_range<Block::args_iterator> getInductionVars() {
+    Block::BlockArgListType getInductionVars() {
       return getBody()->getArguments();
     }
     unsigned getNumLoops() { return step().size(); }


        


More information about the Mlir-commits mailing list