================
@@ -2154,6 +2176,163 @@ genLoopOp(lower::AbstractConverter &converter, 
lower::SymMap &symTable,
   return loopOp;
 }
 
+static mlir::omp::CanonicalLoopOp
+genCanonicalLoopOp(lower::AbstractConverter &converter, lower::SymMap 
&symTable,
+                   semantics::SemanticsContext &semaCtx,
+                   lower::pft::Evaluation &eval, mlir::Location loc,
+                   const ConstructQueue &queue,
+                   ConstructQueue::const_iterator item,
+                   llvm::ArrayRef<const semantics::Symbol *> ivs,
+                   llvm::omp::Directive directive, DataSharingProcessor &dsp) {
+  fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
+
+  assert(ivs.size() == 1 && "Nested loops not yet implemented");
----------------
Meinersbur wrote:

It is currently only called by genUnrollOp which only supports a single loop, 
and can only call `genCanonicalLoopOp` with a single loop. Anything that would 
use genCanonicalLoopOp for nests with multiple loops with need to update the 
implementation: Probably a `genCanonicalLoopNest` that calls 
`genCanonicalLoopOp` multiple times, once for each loop. That is, calling 
`genCanonicalLoopOp` with more than one iv would be a API usage error[^1], not 
a "not yet implemented".

[^1]: Probably `genCanonicalLoopNest` gets the `ArrayRef` and passes each 
matching `semantics::Symbol *` to a call of `genCanonicalLoopOp`, we will see.

https://github.com/llvm/llvm-project/pull/144785
_______________________________________________
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