Lines Matching refs:Br
57 MachineInstr *Br; member
59 MBBInfo() : Size(0), HasLongBranch(false), Br(0) {} in MBBInfo()
82 int64_t computeOffset(const MachineInstr *Br);
83 void replaceBranch(MachineBasicBlock &MBB, Iter Br, DebugLoc DL,
107 static MachineBasicBlock *getTargetMBB(const MachineInstr &Br) { in getTargetMBB() argument
108 for (unsigned I = 0, E = Br.getDesc().getNumOperands(); I < E; ++I) { in getTargetMBB()
109 const MachineOperand &MO = Br.getOperand(I); in getTargetMBB()
185 ReverseIter Br = getNonDebugInstr(MBB->rbegin(), End); in initMBBInfo() local
187 if ((Br != End) && !Br->isIndirectBranch() && in initMBBInfo()
188 (Br->isConditionalBranch() || in initMBBInfo()
189 (Br->isUnconditionalBranch() && in initMBBInfo()
191 MBBInfos[I].Br = (++Br).base(); in initMBBInfo()
196 int64_t MipsLongBranch::computeOffset(const MachineInstr *Br) { in computeOffset() argument
198 int ThisMBB = Br->getParent()->getNumber(); in computeOffset()
199 int TargetMBB = getTargetMBB(*Br)->getNumber(); in computeOffset()
218 void MipsLongBranch::replaceBranch(MachineBasicBlock &MBB, Iter Br, in replaceBranch() argument
220 unsigned NewOpc = TII->GetOppositeBranchOpc(Br->getOpcode()); in replaceBranch()
223 MachineInstrBuilder MIB = BuildMI(MBB, Br, DL, NewDesc); in replaceBranch()
225 for (unsigned I = 0, E = Br->getDesc().getNumOperands(); I < E; ++I) { in replaceBranch()
226 MachineOperand &MO = Br->getOperand(I); in replaceBranch()
238 Br->eraseFromParent(); in replaceBranch()
244 MachineBasicBlock *MBB = I.Br->getParent(), *TgtMBB = getTargetMBB(*I.Br); in expandToLongBranch()
245 DebugLoc DL = I.Br->getDebugLoc(); in expandToLongBranch()
366 if (I.Br->isUnconditionalBranch()) { in expandToLongBranch()
368 assert(I.Br->getDesc().getNumOperands() == 1); in expandToLongBranch()
369 I.Br->RemoveOperand(0); in expandToLongBranch()
370 I.Br->addOperand(MachineOperand::CreateMBB(LongBrMBB)); in expandToLongBranch()
373 replaceBranch(*MBB, I.Br, DL, FallThroughMBB); in expandToLongBranch()
408 if (!I->Br || I->HasLongBranch) in runOnMachineFunction()
412 if (!ForceLongBranch && isInt<16>(computeOffset(I->Br) / 4)) in runOnMachineFunction()