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

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Jul 27 08:10:38 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b08369f7f288b6efb0897953da42ed54e60cfc0b
      https://github.com/llvm/llvm-project/commit/b08369f7f288b6efb0897953da42ed54e60cfc0b
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-07-27 (Wed, 27 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




More information about the All-commits mailing list