[Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (#77761)
commit55cb52bbc539777aeb176f22fef0b4bfc70883fc
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>
Mon, 22 Jan 2024 14:41:07 +0000 (22 08:41 -0600)
committerGitHub <noreply@github.com>
Mon, 22 Jan 2024 14:41:07 +0000 (22 08:41 -0600)
tree0a6482cc58476ee4b45e5d89a127b3ccabba3795
parent90af11ea97cf9ab34677720c5b7848eb5e9d4efe
[Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (#77761)

This brings `createBodyOfOp` to its final intended form. First, input
privatization is performed, then the recursive lowering takes place, and
finally the output privatization (lastprivate) is done.

This enables fixing a known issue with infinite loops inside of an
OpenMP region, and the fix is included in this patch.

Fixes https://github.com/llvm/llvm-project/issues/74348.

Recursive lowering [5/5]

---------

Co-authored-by: Kiran Chandramohan <kiran.chandramohan@arm.com>
flang/include/flang/Lower/OpenMP.h
flang/lib/Lower/OpenMP.cpp
flang/test/Lower/OpenMP/FIR/sections.f90
flang/test/Lower/OpenMP/infinite-loop-in-construct.f90 [new file with mode: 0644]
flang/test/Lower/OpenMP/sections.f90
flang/test/Lower/OpenMP/wsloop-unstructured.f90 [new file with mode: 0644]