Skip to content
Commit 29f167ab authored by Kiran Chandramohan's avatar Kiran Chandramohan
Browse files

[Flang][OpenMP] Fixes for unstructured OpenMP code

Since the FIR operations are mostly structured, it is only the functions
that could contain multiple blocks inside an operation. This changes
with OpenMP since OpenMP regions can contain multiple blocks. For
unstructured code, the blocks are created in advance and belong to the
top-level function. This caused code in OpenMP region to be placed under
the function level.

In this fix, if the OpenMP region is unstructured then new blocks are
created inside it.

Note1: This is part of upstreaming from the fir-dev branch of
https://github.com/flang-compiler/f18-llvm-project. The code in this patch is a
subset of the changes in https://github.com/flang-compiler/f18-llvm-project/pull/1178.

Reviewed By: vdonaldson

Differential Revision: https://reviews.llvm.org/D126293



Co-authored-by: default avatarVal Donaldson <vdonaldson@nvidia.com>
Co-authored-by: default avatarEric Schweitz <eschweitz@nvidia.com>
Co-authored-by: default avatarValentin Clement <clementval@gmail.com>
parent 0bf3c38b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment