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

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 12:38:41 PST 2021


jdoerfert added a subscriber: ggeorgakoudis.
jdoerfert added a comment.

What we should do, as we move to the OpenMPIRBuilder, is to use runtime interfaces that match OpenMP directives.
Here is the `omp parallel` one for the host: D94332 <https://reviews.llvm.org/D94332>
The device one should look the same, potentially after extending it, as we want to apply the same logic regardless of the device.
This will also make things like parallel region merging (@ggeorgakoudis) much easier.

I would prefer to fix PR48686 with this patch though until we switch to a new interface. The part where I remove the fn argument
meddling is on it's own valuable. We should not (need to) overwrite the function attributes for performance reasons given that we
have not inserted them. The new `noinline` will establish the invariant D94332 <https://reviews.llvm.org/D94332> is going to have as well and which makes OpenMPOpt
much simpler.


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