[Mlir-commits] [mlir] [mlir][loops] Add getters for multi dim loop variables in `LoopLikeOpInterface` (PR #94516)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jun 5 13:33:34 PDT 2024
================
@@ -93,51 +93,47 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> {
}]
>,
InterfaceMethod<[{
- If there is a single induction variable return it, otherwise return
- std::nullopt.
+ Return all induction variables.
}],
- /*retTy=*/"::std::optional<::mlir::Value>",
- /*methodName=*/"getSingleInductionVar",
+ /*retTy=*/"::mlir::ValueRange",
----------------
MaheshRavishankar wrote:
`ValueRange` is essentially a reference. Returning a reference is safe only if you know it is part of the `operands` or `BlockArguments` of the operation.
https://github.com/llvm/llvm-project/pull/94516
More information about the Mlir-commits
mailing list