diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2020-06-08 08:48:49 +0000 |
|---|---|---|
| committer | Guillaume Chatelet <gchatelet@google.com> | 2020-06-08 10:50:27 +0000 |
| commit | 94b0c32a0b94b8df6a1185c0d0be68ad20505c3a (patch) | |
| tree | 8a64f3c77d2b8408eabf985a931cb7595b91f6c0 /llvm/lib/CodeGen/CallingConvLower.cpp | |
| parent | 526352bae351d544dcf25303f77bd13b131a6609 (diff) | |
[Alignment][NFC] Migrate HandleByVal to Align
Summary: Note to downstream target maintainers: this might silently change the semantics of your code if you override `TargetLowering::HandleByVal` without marking it `override`.
This 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: sdardis, hiraditya, jrtc27, atanasyan, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81365
Diffstat (limited to 'llvm/lib/CodeGen/CallingConvLower.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/CallingConvLower.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/CallingConvLower.cpp b/llvm/lib/CodeGen/CallingConvLower.cpp index bc7fa21b8020..366cd985ecf3 100644 --- a/llvm/lib/CodeGen/CallingConvLower.cpp +++ b/llvm/lib/CodeGen/CallingConvLower.cpp @@ -42,8 +42,7 @@ CCState::CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &mf, /// its parameter attribute. void CCState::HandleByVal(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, int MinSize, - int MinAlignment, ISD::ArgFlagsTy ArgFlags) { - Align MinAlign(MinAlignment); + Align MinAlign, ISD::ArgFlagsTy ArgFlags) { Align Alignment = ArgFlags.getNonZeroByValAlign(); unsigned Size = ArgFlags.getByValSize(); if (MinSize > (int)Size) @@ -51,8 +50,7 @@ void CCState::HandleByVal(unsigned ValNo, MVT ValVT, MVT LocVT, if (MinAlign > Alignment) Alignment = MinAlign; ensureMaxAlignment(Alignment); - MF.getSubtarget().getTargetLowering()->HandleByVal(this, Size, - Alignment.value()); + MF.getSubtarget().getTargetLowering()->HandleByVal(this, Size, Alignment); Size = unsigned(alignTo(Size, MinAlign)); unsigned Offset = AllocateStack(Size, Alignment.value()); addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo)); |
