[all-commits] [llvm/llvm-project] 416673: [OpenMP][FIX] Do not crash when kernels are debug ...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Sat Mar 19 12:16:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4166738c3818eddcb593f51a15d047d50072e9d8
      https://github.com/llvm/llvm-project/commit/4166738c3818eddcb593f51a15d047d50072e9d8
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-19 (Sat, 19 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/OpenMP/replace_globalization.ll
    M llvm/test/Transforms/OpenMP/spmdization.ll

  Log Message:
  -----------
  [OpenMP][FIX] Do not crash when kernels are debug wrapper functions

With debug information enabled (-g) Clang will wrap the actual target
region into a new function which is called from the "kernel". The problem
is that the "kernel" is now basically a wrapper without all the things
we expect. More importantly, if we end up asking for an AAKernelInfo
for the "target region function" we might try to turn it into SPMD mode.
That used to cause an assertion as that function doesn't have an
appropriately named `_exec_mode` global. While the global is going away
soon we still need to make sure to properly handle this case, e.g.,
perform optimizations reliably.

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




More information about the All-commits mailing list