Lines Matching +full:branches +full:- +full:ignore
1 //===-- MSP430BranchSelector.cpp - Emit long conditional branches ---------===//
8 //===----------------------------------------------------------------------===//
11 // conditional branches need more than 10 bits of displacement to reach their
16 //===----------------------------------------------------------------------===//
28 #define DEBUG_TYPE "msp430-branch-select"
30 STATISTIC(NumExpanded, "Number of branches expanded to long format");
37 /// BlockSizes - The sizes of the basic blocks in the function.
54 /// createMSP430BranchSelectionPass - returns an instance of the Branch
64 // Give the blocks of the function a dense, in-order, numbering. in runOnMachineFunction()
73 BlockSize += TII->GetInstSizeInBytes(MI); in runOnMachineFunction()
80 // we know we don't need to shrink any branches in this function. This is a in runOnMachineFunction()
99 // Iteratively expand branches until we reach a fixed point. in runOnMachineFunction()
108 if ((I->getOpcode() != MSP430::JCC || I->getOperand(0).isImm()) && in runOnMachineFunction()
109 I->getOpcode() != MSP430::JMP) { in runOnMachineFunction()
110 MBBStartOffset += TII->GetInstSizeInBytes(*I); in runOnMachineFunction()
116 MachineBasicBlock *Dest = I->getOperand(0).getMBB(); in runOnMachineFunction()
119 if (Dest->getNumber() <= MBB.getNumber()) { in runOnMachineFunction()
125 for (unsigned i = Dest->getNumber(), e = MBB.getNumber(); i != e; ++i) in runOnMachineFunction()
130 BranchSize = -MBBStartOffset; in runOnMachineFunction()
132 for (unsigned i = MBB.getNumber(), e = Dest->getNumber(); i != e; ++i) in runOnMachineFunction()
136 // If this branch is in range, ignore it. in runOnMachineFunction()
147 if (I->getOpcode() == MSP430::JMP) { in runOnMachineFunction()
154 Cond.push_back(I->getOperand(1)); in runOnMachineFunction()
157 TII->ReverseBranchCondition(Cond); in runOnMachineFunction()
158 BuildMI(MBB, I, dl, TII->get(MSP430::JCC)) in runOnMachineFunction()
164 I = BuildMI(MBB, I, dl, TII->get(MSP430::Bi)).addMBB(Dest); in runOnMachineFunction()
170 // block by NewSize-2, remember to iterate. in runOnMachineFunction()
171 BlockSizes[MBB.getNumber()] += NewSize-2; in runOnMachineFunction()