[llvm] 33b1f41 - MemoryBuiltins: getAllocAlignment is now useful for non-allocator funcs
Augie Fackler via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 06:51:43 PDT 2022
Author: Augie Fackler
Date: 2022-04-06T09:51:38-04:00
New Revision: 33b1f4191456a8255de0842c9c885f69187185b8
URL: https://github.com/llvm/llvm-project/commit/33b1f4191456a8255de0842c9c885f69187185b8
DIFF: https://github.com/llvm/llvm-project/commit/33b1f4191456a8255de0842c9c885f69187185b8.diff
LOG: MemoryBuiltins: getAllocAlignment is now useful for non-allocator funcs
This has been true since dba73135c8b7a02afb535328a7475e0a6890c271, but
didn't matter until now because clang wasn't emitting allocalign
attributes.
Differential Revision: https://reviews.llvm.org/D121640
Added:
Modified:
llvm/lib/Analysis/MemoryBuiltins.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp
index 05e38ebcfac59..cef644910a41e 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -334,8 +334,6 @@ bool llvm::isAllocRemovable(const CallBase *CB, const TargetLibraryInfo *TLI) {
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);
More information about the llvm-commits
mailing list