[PATCH] D76974: [Attributor] Make attributor aware of aligned_alloc for heap to stack conversion
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 11:26:27 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:5033-5040
+ MaybeAlign Alignment;
Constant *Size;
if (isCallocLikeFn(MallocCall, TLI)) {
auto *Num = cast<ConstantInt>(MallocCall->getOperand(0));
auto *SizeT = cast<ConstantInt>(MallocCall->getOperand(1));
APInt TotalSize = SizeT->getValue() * Num->getValue();
Size =
----------------
Hmm, what is the 'default' alignment for alloca?
Even for non-`aligned_alloc`, there's //some// alignment guarantees for the allocation functions..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76974/new/
https://reviews.llvm.org/D76974
More information about the llvm-commits
mailing list