[all-commits] [llvm/llvm-project] 41a278: [OpenMP][FIX] Do not add custom state machine eage...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Oct 26 10:44:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41a278f56aab5fa1b4d8e875207771318a8d3ef0
      https://github.com/llvm/llvm-project/commit/41a278f56aab5fa1b4d8e875207771318a8d3ef0
  Author: Johannes Rudolf Doerfert <doerfert at lassen735.coral.llnl.gov>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/OpenMP/custom_state_machines.ll
    A llvm/test/Transforms/OpenMP/custom_state_machines_pre_lto.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines_remarks.ll
    M llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll
    M llvm/test/Transforms/OpenMP/remove_globalization.ll
    M llvm/test/Transforms/OpenMP/replace_globalization.ll
    M llvm/test/Transforms/OpenMP/spmdization.ll
    M llvm/test/Transforms/OpenMP/spmdization_guarding.ll
    M llvm/test/Transforms/OpenMP/spmdization_guarding_two_reaching_kernels.ll
    M llvm/test/Transforms/OpenMP/spmdization_remarks.ll

  Log Message:
  -----------
  [OpenMP][FIX] Do not add custom state machine eagerly in LTO runs

If we run LTO optimization we migth end up introducing a custom state machine
and later transforming the region into SPMD. This is a problem. While a follow
up will introduce a check for the SPMD conversion, this already prevents the
eager custom state machine generation. Only if the kernel init function is
defined, rather then declared, we will emit a custom state machine. SPMD-zation
can happen eagerly though. Tests are adjusted via a weak definition. The LTO
test was added to verify this works as expected.

Differential Revision: https://reviews.llvm.org/D136740




More information about the All-commits mailing list