[PATCH] D134689: [OpenMP][Attributor] Move allocas converted from __kmpc_alloc_shared to entry block
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 27 06:39:05 PDT 2022
jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.
We still need the size check, see the change suggestion.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:6358-6364
+ // Check if we still think we can move it into the entry block. If the
+ // alloca comes from a converted __kmpc_alloc_shared then move it to
+ // the entry block.
+ if (AI.LibraryFunctionId == LibFunc___kmpc_alloc_shared)
+ AI.MoveAllocaIntoEntry = true;
+ else if (AI.MoveAllocaIntoEntry &&
+ (!Size.has_value() || IsInLoop(*AI.CB->getParent())))
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134689/new/
https://reviews.llvm.org/D134689
More information about the llvm-commits
mailing list