[PATCH] D94315: [OpenMP][FIX] Enforce a function boundary for a new data environment

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 10:14:49 PST 2021


ABataev added a comment.

In D94315#2487257 <https://reviews.llvm.org/D94315#2487257>, @jdoerfert wrote:

> In D94315#2487244 <https://reviews.llvm.org/D94315#2487244>, @ABataev wrote:
>
>> In D94315#2487242 <https://reviews.llvm.org/D94315#2487242>, @jdoerfert wrote:
>>
>>> I don't understand where `inaccessiblemem_or_argmemonly` is coming from. This prevents us from inlining the outlined parallel region.
>>
>> __kmpc_serialized_parallel and __kmpc_end_serialized_parallel functions are marked with this attribute and I think OpenMPOpt optimizes read_only functions because of this. I.e. it does not consider __kmpc_serialized_parallel and __kmpc_end_serialized_paralle function calls as opimization barriers.
>
> Can you provide an example why this is a problem?

Looks like PR48686, you mentioned, caused by this. The second function call should not be optimized, because it is inside the region between __kmpc_serialized_parallel() and __kmpc_end_serialized_parallel() function calls.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94315/new/

https://reviews.llvm.org/D94315



More information about the cfe-commits mailing list