[PATCH] D98608: [Attributor] Make sure Heap2Stack works properly on a GPU target

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 14 10:40:43 PDT 2021


jdoerfert created this revision.
jdoerfert added reviewers: sstefan1, uenoku.
Herald added subscribers: okura, kuter, hiraditya.
Herald added a reviewer: bollu.
Herald added a reviewer: homerdin.
jdoerfert requested review of this revision.
Herald added a reviewer: baziotis.
Herald added a subscriber: bbn.
Herald added a project: LLVM.

If the target stack is not accessible between different running
"threads" we have to make sure not to create allocas for mallocs
that might be used by multiple "threads". The "use check" is
sufficient to prevent this but if we apply the "free check" we have
to make sure the pointer is not communicated to others before
the free is reached.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98608

Files:
  llvm/include/llvm/Transforms/IPO/Attributor.h
  llvm/lib/Transforms/IPO/AttributorAttributes.cpp
  llvm/test/Transforms/Attributor/heap_to_stack.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98608.330522.patch
Type: text/x-patch
Size: 30921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210314/2c8443bb/attachment.bin>


More information about the llvm-commits mailing list