• Home
  • Raw
  • Download

Lines Matching refs:Br

56     MachineInstr *Br;  member
58 MBBInfo() : Size(0), HasLongBranch(false), Br(nullptr) {} in MBBInfo()
83 int64_t computeOffset(const MachineInstr *Br);
84 void replaceBranch(MachineBasicBlock &MBB, Iter Br, const 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()
186 ReverseIter Br = getNonDebugInstr(MBB->rbegin(), End); in initMBBInfo() local
188 if ((Br != End) && !Br->isIndirectBranch() && in initMBBInfo()
189 (Br->isConditionalBranch() || (Br->isUnconditionalBranch() && IsPIC))) in initMBBInfo()
190 MBBInfos[I].Br = &*(++Br).base(); in initMBBInfo()
195 int64_t MipsLongBranch::computeOffset(const MachineInstr *Br) { in computeOffset() argument
197 int ThisMBB = Br->getParent()->getNumber(); in computeOffset()
198 int TargetMBB = getTargetMBB(*Br)->getNumber(); in computeOffset()
217 void MipsLongBranch::replaceBranch(MachineBasicBlock &MBB, Iter Br, in replaceBranch() argument
222 unsigned NewOpc = TII->getOppositeBranchOpc(Br->getOpcode()); in replaceBranch()
225 MachineInstrBuilder MIB = BuildMI(MBB, Br, DL, NewDesc); in replaceBranch()
227 for (unsigned I = 0, E = Br->getDesc().getNumOperands(); I < E; ++I) { in replaceBranch()
228 MachineOperand &MO = Br->getOperand(I); in replaceBranch()
240 if (Br->hasDelaySlot()) { in replaceBranch()
243 assert(Br->isBundledWithSucc()); in replaceBranch()
244 MachineBasicBlock::instr_iterator II = Br.getInstrIterator(); in replaceBranch()
247 Br->eraseFromParent(); in replaceBranch()
257 MachineBasicBlock *MBB = I.Br->getParent(), *TgtMBB = getTargetMBB(*I.Br); in expandToLongBranch()
258 DebugLoc DL = I.Br->getDebugLoc(); in expandToLongBranch()
440 if (I.Br->isUnconditionalBranch()) { in expandToLongBranch()
442 assert(I.Br->getDesc().getNumOperands() == 1); in expandToLongBranch()
443 I.Br->RemoveOperand(0); in expandToLongBranch()
444 I.Br->addOperand(MachineOperand::CreateMBB(LongBrMBB)); in expandToLongBranch()
447 replaceBranch(*MBB, I.Br, DL, &*FallThroughMBB); in expandToLongBranch()
490 if (!I->Br || I->HasLongBranch) in runOnMachineFunction()
494 int64_t Offset = computeOffset(I->Br) / ShVal; in runOnMachineFunction()