[Mlir-commits] [mlir] [mlir][Interfaces] `LoopLikeOpInterface`: Add helper to get yielded values (PR #67305)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 5 08:32:25 PDT 2023


================
@@ -1972,6 +1972,12 @@ mlir::Value fir::IterWhileOp::blockArgToSourceOp(unsigned blockArgNum) {
   return {};
 }
 
+mlir::ValueRange fir::IterWhileOp::getYieldedValues() {
+  auto *term = getRegion().front().getTerminator();
+  return getFinalValue() ? term->getOperands().drop_front()
----------------
qcolombet wrote:

Just double checking, the `drop_front` here drops the final value, is that correct?

https://github.com/llvm/llvm-project/pull/67305


More information about the Mlir-commits mailing list