[Openmp-commits] [PATCH] D122043: [OpenMP][FIX] Do not crash when kernels are debug wrapper functions

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 18 14:58:40 PDT 2022


jdoerfert created this revision.
jdoerfert added a reviewer: jhuber6.
Herald added subscribers: ormris, guansong, bollu, hiraditya, yaxunl.
Herald added a project: All.
jdoerfert requested review of this revision.
Herald added subscribers: llvm-commits, sstefan1.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122043

Files:
  llvm/lib/Transforms/IPO/OpenMPOpt.cpp
  llvm/test/Transforms/OpenMP/spmdization.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122043.416613.patch
Type: text/x-patch
Size: 76406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220318/b798ba27/attachment-0001.bin>


More information about the Openmp-commits mailing list