Lines Matching +full:align +full:- +full:end
1 //===--- ARMBasicBlockInfo.cpp - Utilities for block sizes ---------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
20 #define DEBUG_TYPE "arm-bb-utils"
26 // mayOptimizeThumb2Instruction - Returns true if optimizeThumb2Instructions
30 switch(MI->getOpcode()) {
47 LLVM_DEBUG(dbgs() << "computeBlockSize: " << MBB->getName() << "\n");
48 BasicBlockInfo &BBI = BBInfo[MBB->getNumber()];
51 BBI.PostAlign = Align(1);
54 BBI.Size += TII->getInstSizeInBytes(I);
64 // tBR_JTr contains a .align 2 directive.
65 if (!MBB->empty() && MBB->back().getOpcode() == ARM::tBR_JTr) {
66 BBI.PostAlign = Align(4);
67 MBB->getParent()->ensureAlignment(Align(4));
71 /// getOffsetOf - Return the current offset of the specified machine instruction
75 const MachineBasicBlock *MBB = MI->getParent();
80 unsigned Offset = BBInfo[MBB->getNumber()].Offset;
83 for (MachineBasicBlock::const_iterator I = MBB->begin(); &*I != MI; ++I) {
84 assert(I != MBB->end() && "Didn't find MI in its own basic block?");
85 Offset += TII->getInstSizeInBytes(*I);
90 /// isBBInRange - Returns true if the distance between specific MI and
97 unsigned DestOffset = BBInfo[DestBB->getNumber()].Offset;
100 << " from " << printMBBReference(*MI->getParent())
103 << int(DestOffset - BrOffset) << "\t" << *MI);
107 if (DestOffset-BrOffset <= MaxDisp)
110 if (BrOffset-DestOffset <= MaxDisp)
117 assert(BB->getParent() == &MF &&
120 unsigned BBNum = BB->getNumber();
122 << " - name: " << BB->getName() << "\n"
123 << " - number: " << BB->getNumber() << "\n"
124 << " - function: " << MF.getName() << "\n"
125 << " - blocks: " << MF.getNumBlockIDs() << "\n");
128 // Get the offset and known bits at the end of the layout predecessor.
130 const Align Align = MF.getBlockNumbered(i)->getAlignment();
131 const unsigned Offset = BBInfo[i - 1].postOffset(Align);
132 const unsigned KnownBits = BBInfo[i - 1].postKnownBits(Align);
147 } // end namespace llvm