[OpenMP] Change AAKernelInfo to ignore non-kernels
authorJoseph Huber <jhuber6@vols.utk.edu>
Wed, 18 Aug 2021 00:29:54 +0000 (20:29 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 18 Aug 2021 15:24:29 +0000 (11:24 -0400)
commit58f93264878a3fb9db9d901c5d7dfdcde4291d6a
treeadd9e113cb09e32d709c1edc34d1d0ea52baf87e
parentedb8acdc6ea291308ee3b1b0e697adba183ccd5e
[OpenMP] Change AAKernelInfo to ignore non-kernels

Currently, AAKernelInfo will fail on an assertion if we attempt to run
it on a kernel without the init / deinit runtime calls. However, this
occurs for global constructors on the device. This will cause OpenMPOpt
to crash whenever global constructors are present. This patch removes
this assertion and just gives up instead.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D108258
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/global_constructor.ll [new file with mode: 0644]