[all-commits] [llvm/llvm-project] 7db4e6: [OpenMP][LLVM] Update alloca IP after `PrivCB` in ...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Tue Jun 4 20:14:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7db4e6c1ec18785ad3f622556362d83c11d7efef
      https://github.com/llvm/llvm-project/commit/7db4e6c1ec18785ad3f622556362d83c11d7efef
  Author: Kareem Ergawy <kareem.ergawy at amd.com>
  Date:   2024-06-05 (Wed, 05 Jun 2024)

  Changed paths:
    M clang/test/OpenMP/parallel_codegen.cpp
    A flang/test/Lower/OpenMP/delayed-privatization-lower-allocatable-to-llvm.f90
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

  Log Message:
  -----------
  [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (#93920)

Fixes a crash uncovered by
[pr77666.f90](https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/gomp/pr77666.f90)
in the test suite when delayed privatization is enabled by default.

In particular, whenever `PrivCB` (the callback responsible for
generating privatizaiton logic for an OMP variable) generates a
multi-block privatization region, the insertion point diverges: the BB
component of the IP can become a different BB from the parent block of
the instruction iterator component of the IP. This PR updates the IP to
make sure that the BB is the parent block of the instruction iterator.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list