[PATCH] D122431: Basic support for posix_memalign / __builtin_object_size interaction
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 06:46:15 PDT 2022
serge-sans-paille added inline comments.
================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:899
+ ConstantInt::get(CB->getType(), 0));
+ Optional<bool> Checked = isImpliedByDomCondition(FakeCond, &Load, DL);
+ delete FakeCond;
----------------
xbolva00 wrote:
> Do you need FakeCond at all?
>
> llvm::isImpliedByDomCondition (CmpInst::Predicate Pred, const Value *LHS, const Value *RHS, const Instruction *ContextI, const DataLayout &DL)
Indeed!
================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:156
{LibFunc___kmpc_alloc_shared, {MallocLike, 1, 0, -1, -1, MallocFamily::KmpcAllocShared}},
- // TODO: Handle "int posix_memalign(void **, size_t, size_t)"
};
----------------
xbolva00 wrote:
> xbolva00 wrote:
> > why remove? no record above for posix_memalign was added..
> Still no answer
Yup, sorry: because it's API is so different (and unique ?) from other library functions. It doesn't fit any of the existing `MallocFamily` nor `AllocType`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122431/new/
https://reviews.llvm.org/D122431
More information about the llvm-commits
mailing list