diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2020-04-02 08:53:29 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2020-04-02 09:00:53 +0000 |
commit | 189d2e215f686e5ad1604a2ba437c4c9789b6a36 (patch) | |
tree | 0761825bac1a3101885d80bf01c49eb2192e1135 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 550ab58bc106335f8dcbc1767548a55c7151f87a (diff) | |
download | llvm-189d2e215f686e5ad1604a2ba437c4c9789b6a36.zip llvm-189d2e215f686e5ad1604a2ba437c4c9789b6a36.tar.gz llvm-189d2e215f686e5ad1604a2ba437c4c9789b6a36.tar.bz2 |
[Alignment][NFC] Use more Align versions of various functions
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, arsenm, sdardis, jvesely, nhaehnle, hiraditya, jrtc27, atanasyan, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77291
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 69db1d9..e5caec4 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1530,7 +1530,7 @@ void llvm::GetReturnInfo(CallingConv::ID CC, Type *ReturnType, /// alignment, not its logarithm. unsigned TargetLoweringBase::getByValTypeAlignment(Type *Ty, const DataLayout &DL) const { - return DL.getABITypeAlignment(Ty); + return DL.getABITypeAlign(Ty).value(); } bool TargetLoweringBase::allowsMemoryAccessForAlignment( @@ -1542,7 +1542,7 @@ bool TargetLoweringBase::allowsMemoryAccessForAlignment( // For example, the ABI alignment may change based on software platform while // this function should only be affected by hardware implementation. Type *Ty = VT.getTypeForEVT(Context); - if (Alignment >= DL.getABITypeAlignment(Ty)) { + if (Alignment >= DL.getABITypeAlign(Ty).value()) { // Assume that an access that meets the ABI-specified alignment is fast. if (Fast != nullptr) *Fast = true; |