================
@@ -2642,6 +2647,97 @@ class FirConverter : public
Fortran::lower::AbstractConverter {
return wrapOp;
}
+ /// Wrap a loop's *body* -- not the construct, and not the loop control -- in
+ /// an scf.execute_region. A category (c) loop keeps its structured loop op
+ /// while its self-contained raw branching lives inside the region, which may
+ /// hold as many blocks as it needs.
+ ///
+ /// The builder must already be positioned inside the loop body. On return it
+ /// is inside the region. Returns null when the loop has no such internals.
+ mlir::scf::ExecuteRegionOp
+ wrapUnstructuredBody(Fortran::lower::pft::Evaluation &eval,
+ mlir::Block *&yieldBlock,
+ mlir::Block *&savedEndDoBlock) {
+ if (!eval.lowerBodyAsWrappedRegion())
----------------
ergawy wrote:
Done in 6cc6a642e05a61b9a502bae21fc19a2d4e39827c
(https://github.com/llvm/llvm-project/pull/225757).
https://github.com/llvm/llvm-project/pull/225758
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits