[PATCH] D121640: MemoryBuiltins: getAllocAlignment is now useful for non-allocator funcs
Augie Fackler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 14:25:47 PDT 2022
durin42 created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
durin42 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This has been true since dba73135c8b7a02afb535328a7475e0a6890c271 <https://reviews.llvm.org/rGdba73135c8b7a02afb535328a7475e0a6890c271>, but
didn't matter until now because clang wasn't emitting allocalign
attributes.
Depends on D121629 <https://reviews.llvm.org/D121629>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121640
Files:
llvm/lib/Analysis/MemoryBuiltins.cpp
Index: llvm/lib/Analysis/MemoryBuiltins.cpp
===================================================================
--- llvm/lib/Analysis/MemoryBuiltins.cpp
+++ llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -331,8 +331,6 @@
Value *llvm::getAllocAlignment(const CallBase *V,
const TargetLibraryInfo *TLI) {
- assert(isAllocationFn(V, TLI));
-
const Optional<AllocFnsTy> FnData = getAllocationData(V, AnyAlloc, TLI);
if (FnData.hasValue() && FnData->AlignParam >= 0) {
return V->getOperand(FnData->AlignParam);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121640.415227.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220314/4269c4b3/attachment.bin>
More information about the llvm-commits
mailing list