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

Stefan Stipanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 12:40:41 PDT 2021


sstefan1 added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:5066
   const std::string getAsStr() const override {
-    return "[H2S] Mallocs: " + std::to_string(MallocCalls.size());
+    return "[H2S] Mallocs: " + std::to_string(MallocCalls.size()) + "/" +
+           std::to_string(BadMallocCalls.size());
----------------



================
Comment at: llvm/test/Transforms/Attributor/heap_to_stack.ll:7
 
-declare noalias i8* @malloc(i64)
+declare noalias i8* @malloc(i64) nosync
 
----------------
Should we also annotate these in some cases? AFAIK these will never be `nosync` right now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98608



More information about the llvm-commits mailing list