[PATCH] D101977: [OpenMP] Create custom state machines for generic target regions

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 22:32:14 PDT 2021


jdoerfert added a comment.

I looked over this again because I think we will later move the logic into an AbstractAttribute. The reason is that we want to reuse some of the analysis in AAKernelInfo to determine if we can use SPMD mode. Basically, if the shared memory is only used in a nice way and fees into an actual parallel51, it is compatible with SPMD mode. If we go to SPMD mode we have (or better should) eliminate the shared memory indirection. Maybe we move all of this into AAHeapToStack and make a more general AAAllocationInfo out of it. Let's see.

That said, I noticed a problem below. Please add a test that misses the free, and/or that has a phi before the free, to make sure we do not globalize.



================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:507
+
+  /// "Clamp" this state with \p KIS.
+  KernelInfoState operator^=(const KernelInfoState &KIS) {
----------------
ggeorgakoudis wrote:
> Nit, concatenation?
It won't always be described properly by "concatenation". Already the `|=` part is on the border, once we do SPMD detection there will be a `&=` as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101977



More information about the llvm-commits mailing list