forked from OSchip/llvm-project
MemoryBuiltins: getAllocAlignment is now useful for non-allocator funcs
This has been true since dba73135c8
, but
didn't matter until now because clang wasn't emitting allocalign
attributes.
Differential Revision: https://reviews.llvm.org/D121640
This commit is contained in:
parent
538c77172a
commit
33b1f41914
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue