[all-commits] [llvm/llvm-project] 29f167: [Flang][OpenMP] Fixes for unstructured OpenMP code

kiranchandramohan via All-commits all-commits at lists.llvm.org
Tue May 24 14:42:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 29f167abcf7d871d17dd3f38f361916de1a12470
      https://github.com/llvm/llvm-project/commit/29f167abcf7d871d17dd3f38f361916de1a12470
  Author: Kiran Chandramohan <kiran.chandramohan at arm.com>
  Date:   2022-05-24 (Tue, 24 May 2022)

  Changed paths:
    M flang/lib/Lower/OpenMP.cpp
    A flang/test/Lower/OpenMP/omp-unstructured.f90

  Log Message:
  -----------
  [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: Val Donaldson <vdonaldson at nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz at nvidia.com>
Co-authored-by: Valentin Clement <clementval at gmail.com>




More information about the All-commits mailing list