[all-commits] [llvm/llvm-project] fd8fd9: Revert "[OpenMP] Remove noinline attributes in the...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Jul 29 22:14:16 PDT 2022

  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: fd8fd9e51cbeb76d290ceda941fd8b7d5a4151bc
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    A llvm/test/Transforms/OpenMP/remove_noinline_attributes.ll
    M openmp/libomptarget/DeviceRTL/include/Synchronization.h
    M openmp/libomptarget/DeviceRTL/src/Mapping.cpp
    M openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
    M openmp/libomptarget/DeviceRTL/src/State.cpp
    M openmp/libomptarget/DeviceRTL/src/Synchronization.cpp

  Log Message:
  Revert "[OpenMP] Remove noinline attributes in the device runtime"

The behaviour of this patch is not great, but it has some side-effects
that are required for OpenMPOpt to work. The problem is that when we use
`-mlink-builtin-bitcode` we only import used symbols from the runtime.
Then OpenMPOpt will insert calls to symbols that were not previously
included. This patch removed this implicit behaviour as these functions
were kept alive by the `noinline` simply because it kept calls to them
in the module. This caused regression in some tests that relied on some
OpenMPOpt passes without using LTO. Reverting for the LLVM15 release but
will try to fix it more correctly on main.

This reverts commit d61d72dae604c3258e25c00622b1a85861450303.

Fixes #56752

(cherry picked from commit b08369f7f288b6efb0897953da42ed54e60cfc0b)

More information about the All-commits mailing list