[PATCH] D87975: [IR] MaxObjSize Attribute
Atmn Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 12:15:24 PDT 2020
atmnpatel added inline comments.
================
Comment at: llvm/lib/IR/Value.cpp:723
+ if (!AI->isArrayAllocation()) {
+ MaxObjSizeBytes = DL.getTypeStoreSize(AI->getAllocatedType());
+ }
----------------
efriedma wrote:
> Can you use llvm::getObjectSize here, instead of rolling your own version that has bugs?
I don't think we can, this check here is trying to offload the actual max object size calculation to the Attributor, while getObjectSize doesn't take the attributes into account at all (from what I can tell).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87975/new/
https://reviews.llvm.org/D87975
More information about the llvm-commits
mailing list