[PATCH] D97873: [Attributor] Enable heap-to-stack of any size
    Johannes Doerfert via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Mar  5 09:52:08 PST 2021
    
    
  
jdoerfert accepted this revision.
jdoerfert added a comment.
LG, one nit comment below, address as makes sense.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:5012
+        IRBuilder<> B(MallocCall);
+        Size = B.CreateMul(Num, SizeT);
       } else if (isAlignedAllocLikeFn(MallocCall, TLI)) {
----------------
If `MaxHeapToStackSize` is not -1, we can mark it nuw at least because we checked for overflow.
Should we just call the constructor, going through a builder seems kinda weird, except if we add a constant folder. Also, add a name, "h2s.calloc.size" or something.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97873/new/
https://reviews.llvm.org/D97873
    
    
More information about the llvm-commits
mailing list