summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-09-18 15:49:49 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-09-18 15:49:49 +0000
commitd4c4671aa70a3e18f97cd0fd00352a73b18b1d40 (patch)
treed9e159d6b70cd4ca2438a86d66e0629a13254c8f /llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp
parent35b4b403b441c7105a58fcfe35748ccfd89faf53 (diff)
downloadbcm5719-llvm-d4c4671aa70a3e18f97cd0fd00352a73b18b1d40.tar.gz
bcm5719-llvm-d4c4671aa70a3e18f97cd0fd00352a73b18b1d40.zip
[Alignment][NFC] Remove LogAlignment 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: arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67620 llvm-svn: 372231
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp b/llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp
index a8bdefa9193..4bf32be686d 100644
--- a/llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp
@@ -47,7 +47,7 @@ void ARMBasicBlockUtils::computeBlockSize(MachineBasicBlock *MBB) {
BasicBlockInfo &BBI = BBInfo[MBB->getNumber()];
BBI.Size = 0;
BBI.Unalign = 0;
- BBI.PostAlign = 0;
+ BBI.PostAlign = llvm::Align::None();
for (MachineInstr &I : *MBB) {
BBI.Size += TII->getInstSizeInBytes(I);
@@ -62,7 +62,7 @@ void ARMBasicBlockUtils::computeBlockSize(MachineBasicBlock *MBB) {
// tBR_JTr contains a .align 2 directive.
if (!MBB->empty() && MBB->back().getOpcode() == ARM::tBR_JTr) {
- BBI.PostAlign = 2;
+ BBI.PostAlign = llvm::Align(4);
MBB->getParent()->ensureAlignment(llvm::Align(4));
}
}
@@ -126,9 +126,9 @@ void ARMBasicBlockUtils::adjustBBOffsetsAfter(MachineBasicBlock *BB) {
for(unsigned i = BBNum + 1, e = MF.getNumBlockIDs(); i < e; ++i) {
// Get the offset and known bits at the end of the layout predecessor.
// Include the alignment of the current block.
- unsigned LogAlign = MF.getBlockNumbered(i)->getLogAlignment();
- unsigned Offset = BBInfo[i - 1].postOffset(LogAlign);
- unsigned KnownBits = BBInfo[i - 1].postKnownBits(LogAlign);
+ const llvm::Align Align = MF.getBlockNumbered(i)->getAlignment();
+ const unsigned Offset = BBInfo[i - 1].postOffset(Align);
+ const unsigned KnownBits = BBInfo[i - 1].postKnownBits(Align);
// This is where block i begins. Stop if the offset is already correct,
// and we have updated 2 blocks. This is the maximum number of blocks
OpenPOWER on IntegriCloud