[all-commits] [llvm/llvm-project] e5f163: [Flang]Fix for changed code at the end of AllocaIP...

Mats Petersson via All-commits all-commits at lists.llvm.org
Tue Jun 18 13:11:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5f16393429bd73ea7d8a73cdc19408114c9e944
      https://github.com/llvm/llvm-project/commit/e5f16393429bd73ea7d8a73cdc19408114c9e944
  Author: Mats Petersson <mats.petersson at arm.com>
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
    M clang/test/OpenMP/irbuilder_nested_parallel_for.c
    M clang/test/OpenMP/nested_loop_codegen.cpp
    A flang/test/Lower/OpenMP/parallel-reduction-mixed.f90
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Target/LLVMIR/openmp-parallel-reduction-cleanup.mlir
    M mlir/test/Target/LLVMIR/openmp-reduction-init-arg.mlir

  Log Message:
  -----------
  [Flang]Fix for changed code at the end of AllocaIP. (#92430)

Some of the OpenMP code can change the instruction pointed at by the
insertion point. This leads to an assert in the compiler about
BB->getParent() and IP->getParent() not matching.

The fix is to rebuild the insertionpoint from the block, rather than use
builder.restoreIP.

Also, move some of the alloca generation, rather than skipping back and
forth between insert points (and ensure all the allocas are done before
their users are created).

A simple test, mainly to ensure the minimal reproducer doesn't fail to
compile in the future is also added.



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