diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2020-04-01 13:49:04 +0000 |
|---|---|---|
| committer | Guillaume Chatelet <gchatelet@google.com> | 2020-04-01 14:08:28 +0000 |
| commit | 1dffa2550b535c17998b0f9362a0997b3950b970 (patch) | |
| tree | d7e293f8ab65eb4daed53e02cc1eabdc0a947536 /llvm/lib/CodeGen/StackSlotColoring.cpp | |
| parent | 501522b5b2a1b2620370c2885da7caa7ed3b5c73 (diff) | |
[Alignment][NFC] Transition to MachineFrameInfo::getObjectAlign()
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: arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, atanasyan, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77215
Diffstat (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/StackSlotColoring.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp index 7ae758323280..3cc5d30ebad7 100644 --- a/llvm/lib/CodeGen/StackSlotColoring.cpp +++ b/llvm/lib/CodeGen/StackSlotColoring.cpp @@ -74,7 +74,7 @@ namespace { SmallVector<SmallVector<MachineMemOperand *, 8>, 16> SSRefs; // OrigAlignments - Alignments of stack objects before coloring. - SmallVector<unsigned, 16> OrigAlignments; + SmallVector<Align, 16> OrigAlignments; // OrigSizes - Sizess of stack objects before coloring. SmallVector<unsigned, 16> OrigSizes; @@ -227,7 +227,7 @@ void StackSlotColoring::InitializeSlots() { continue; SSIntervals.push_back(&li); - OrigAlignments[FI] = MFI->getObjectAlignment(FI); + OrigAlignments[FI] = MFI->getObjectAlign(FI); OrigSizes[FI] = MFI->getObjectSize(FI); auto StackID = MFI->getStackID(FI); @@ -309,9 +309,9 @@ int StackSlotColoring::ColorSlot(LiveInterval *li) { // Change size and alignment of the allocated slot. If there are multiple // objects sharing the same slot, then make sure the size and alignment // are large enough for all. - unsigned Align = OrigAlignments[FI]; - if (!Share || Align > MFI->getObjectAlignment(Color)) - MFI->setObjectAlignment(Color, Align); + Align Alignment = OrigAlignments[FI]; + if (!Share || Alignment > MFI->getObjectAlign(Color)) + MFI->setObjectAlignment(Color, Alignment); int64_t Size = OrigSizes[FI]; if (!Share || Size > MFI->getObjectSize(Color)) MFI->setObjectSize(Color, Size); |
