[PATCH] D104993: [Attributor] Reorganize AAHeapToStack

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 11:20:13 PDT 2021


jhuber6 accepted this revision.
jhuber6 added a comment.
This revision is now accepted and ready to land.

LG with a few nits.



================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:4852
+    /// The kind of allocation.
+    const enum {
+      MALLOC,
----------------
I feel like this should be given a name inside an enum class.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:4902
+      if (isFreeCall(CB, TLI)) {
+        DeallocationInfos[CB] = new (A.Allocator) DeallocationInfo{CB};
+        return true;
----------------
Couldn't this be a `unique_ptr`?


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:5328
+          else
+            dbgs() << "[H2S] Allocation size to large: " << *AI.CB << " vs. "
+                   << MaxHeapToStackSize << "\n";
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104993



More information about the llvm-commits mailing list