[PATCH] D97818: [OpenMP] Replace GPU globalization calls with shared memory in the middle-end
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 22:33:17 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:1065
+ }
+ FC->eraseFromParent();
+
----------------
`if (!FC) return false;`
Also move the debug below the exists.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97818/new/
https://reviews.llvm.org/D97818
More information about the llvm-commits
mailing list