Skip to content

Conversation

llvmbot
Copy link
Owner

@llvmbot llvmbot commented Mar 4, 2022

resolves llvm#54208

Libomptarget uses some shared variables to track certain internal stated
in the runtime. This causes problems when we have code that contains no
OpenMP kernels. These variables are normally initialized upon kernel
entry, but if there are no kernels we will see no initialization.
Currently we load the runtime into each source file when not running in
LTO mode, so these variables will be erroneously considered undefined or
dead and removed, causing miscompiles. This patch temporarily works
around the most obvious case, but others still exhibit this problem. We
will need to fix this more soundly later.

Fixes llvm#54208.

Reviewed By: jdoerfert

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

(cherry picked from commit e2dcc22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants