OSDN Git Service

[OpenMP][FIX] Enforce a function boundary for a new data environment
authorJohannes Doerfert <johannes@jdoerfert.de>
Fri, 8 Jan 2021 16:30:28 +0000 (10:30 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 26 Jan 2021 04:43:37 +0000 (22:43 -0600)
commitbd756286d2e774716a12f55db27d070595058d53
treed4113ba31f89197a9c89fd8f02e116760a89789e
parentf19849a07b6728a5100dde3baf8c2bd3bb5e0d6e
[OpenMP][FIX] Enforce a function boundary for a new data environment

Whenever we enter a new OpenMP data environment we want to enter a
function to simplify reasoning. Later we probably want to remove the
entire specialization wrt. the if clause and pass the result to the
runtime, for now this should fix PR48686.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D94315
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
clang/test/OpenMP/parallel_if_codegen.cpp