================
@@ -102,6 +105,47 @@ mlir::Operation *findLoopIterationVarMemDecl(fir::DoLoopOp 
doLoop) {
   return result.getDefiningOp();
 }
 
+/// Collects the op(s) responsible for updating a loop's iteration variable 
with
+/// the current iteration number. For example, for the input IR:
----------------
skatrak wrote:

This function seems to do something more generic than that: it collects all of 
the ops that either take the loop's induction variable as argument or take a 
value as argument that has been calculated based on the result of another 
operation that directly or indirectly took the loop's induction variable as 
argument.

I guess that, similarly to another comment I left at a previous PR in the stack 
https://github.com/llvm/llvm-project/pull/127633#discussion_r1963571510, it's 
doing something more general than it states. If, like the other case, the idea 
is to just store the associated `fir.convert` and `fir.store` operations, 
perhaps it makes more sense to match that pattern specifically.

https://github.com/llvm/llvm-project/pull/127634
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to