[PATCH] D104993: [Attributor] Reorganize AAHeapToStack

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 12:02:07 PDT 2021


jdoerfert marked an inline comment as done.
jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:4902
+      if (isFreeCall(CB, TLI)) {
+        DeallocationInfos[CB] = new (A.Allocator) DeallocationInfo{CB};
+        return true;
----------------
jhuber6 wrote:
> Couldn't this be a `unique_ptr`?
The Attributor has a bump allocator that lives as long as the Attributor. This way allocations are pretty much free and the lifetime matches the AA lifetime nicely.


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