/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/ |
H A D | NVPTXInstrInfo.cpp | 93 MachineBasicBlock *&TBB, in analyzeBranch() argument 108 TBB = LastInst.getOperand(0).getMBB(); in analyzeBranch() 112 TBB = LastInst.getOperand(1).getMBB(); in analyzeBranch() 130 TBB = SecondLastInst.getOperand(1).getMBB(); in analyzeBranch() 140 TBB = SecondLastInst.getOperand(0).getMBB(); in analyzeBranch() 178 MachineBasicBlock *TBB, in insertBranch() argument 186 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 193 BuildMI(&MBB, DL, get(NVPTX::GOTO)).addMBB(TBB); in insertBranch() 195 BuildMI(&MBB, DL, get(NVPTX::CBranch)).add(Cond[0]).addMBB(TBB); in insertBranch() 200 BuildMI(&MBB, DL, get(NVPTX::CBranch)).add(Cond[0]).addMBB(TBB); in insertBranch()
|
H A D | NVPTXInstrInfo.h | 59 bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, 65 unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
H A D | WebAssemblyInstrInfo.cpp | 90 MachineBasicBlock *&TBB, in analyzeBranch() argument 112 TBB = MI.getOperand(0).getMBB(); in analyzeBranch() 120 TBB = MI.getOperand(0).getMBB(); in analyzeBranch() 125 TBB = MI.getOperand(0).getMBB(); in analyzeBranch() 160 MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, in insertBranch() argument 165 if (!TBB) in insertBranch() 168 BuildMI(&MBB, DL, get(WebAssembly::BR)).addMBB(TBB); in insertBranch() 175 BuildMI(&MBB, DL, get(WebAssembly::BR_IF)).addMBB(TBB).add(Cond[1]); in insertBranch() 177 BuildMI(&MBB, DL, get(WebAssembly::BR_UNLESS)).addMBB(TBB).add(Cond[1]); in insertBranch()
|
H A D | WebAssemblyFixBrTableDefaults.cpp | 101 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in fixBrTableDefault() local 104 bool Analyzed = !TII.analyzeBranch(*HeaderMBB, TBB, FBB, Cond); in fixBrTableDefault() 116 if (TBB && TBB != MBB) { in fixBrTableDefault() 135 MI.addOperand(MF, MachineOperand::CreateMBB(TBB)); in fixBrTableDefault()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | EarlyIfConversion.cpp | 95 MachineBasicBlock *TBB; member in __anon4c5015260111::SSAIfConv 102 bool isTriangle() const { return TBB == Tail || FBB == Tail; } in isTriangle() 105 MachineBasicBlock *getTPred() const { return TBB == Tail ? Head : TBB; } in getTPred() 440 TBB = FBB = Tail = nullptr; in canConvertIf() 488 if (TII->analyzeBranch(*Head, TBB, FBB, Cond)) { in canConvertIf() 494 if (!TBB) { in canConvertIf() 508 FBB = TBB == Succ0 ? Succ1 : Succ0; in canConvertIf() 541 if (TBB != Tail && !canPredicateInstrs(TBB)) in canConvertIf() 546 if (TBB != Tail && !canSpeculateInstrs(TBB)) in canConvertIf() 685 assert(Head && Tail && TBB && FBB && "Call canConvertIf first."); in convertIf() [all …]
|
H A D | BranchRelaxation.cpp | 359 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in fixupConditionalBranch() 370 auto insertBranch = [&](MachineBasicBlock *MBB, MachineBasicBlock *TBB, in fixupConditionalBranch() 375 TII->insertBranch(*MBB, TBB, FBB, Cond, DL, &NewBrSize); in fixupConditionalBranch() 395 bool Fail = TII->analyzeBranch(*MBB, TBB, FBB, Cond); in fixupConditionalBranch() 409 if (MBB->getSectionID() != TBB->getSectionID() && in fixupConditionalBranch() 410 TBB->getSectionID() == MBBSectionID::ColdSectionID && in fixupConditionalBranch() 420 insertUncondBranch(NewBB, TBB); in fixupConditionalBranch() 423 MBB->replaceSuccessor(TBB, NewBB); in fixupConditionalBranch() 424 NewBB->addSuccessor(TBB); in fixupConditionalBranch() 437 << printMBBReference(*MBB) << " to " << printMBBReference(*TBB) in fixupConditionalBranch() 321 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; fixupConditionalBranch() local 334 __anon6cb7e2b90302(MachineBasicBlock *MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, SmallVectorImpl<MachineOperand>& Cond) fixupConditionalBranch() argument [all...] |
H A D | MachineLoopUtils.cpp | 121 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in PeelSingleBlockLoop() local 123 bool CanAnalyzeBr = !TII->analyzeBranch(*Loop, TBB, FBB, Cond); in PeelSingleBlockLoop() 127 TII->insertBranch(*Loop, TBB == Exit ? NewBB : TBB, in PeelSingleBlockLoop()
|
H A D | MachineBasicBlock.cpp | 701 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in updateTerminator() local 704 bool B = TII->analyzeBranch(*this, TBB, FBB, Cond); in updateTerminator() 708 if (TBB) { in updateTerminator() 711 if (isLayoutSuccessor(TBB)) in updateTerminator() 737 if (isLayoutSuccessor(TBB)) { in updateTerminator() 744 TII->insertBranch(*this, TBB, nullptr, Cond, DL); in updateTerminator() 754 if (PreviousLayoutSuccessor == TBB) { in updateTerminator() 759 if (!isLayoutSuccessor(TBB)) { in updateTerminator() 761 TII->insertBranch(*this, TBB, nullptr, Cond, DL); in updateTerminator() 767 if (isLayoutSuccessor(TBB)) { in updateTerminator() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/MSP430/ |
H A D | MSP430InstrInfo.cpp | 165 MachineBasicBlock *&TBB, in analyzeBranch() argument 195 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 206 TBB = nullptr; in analyzeBranch() 213 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 226 FBB = TBB; in analyzeBranch() 227 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 235 assert(TBB); in analyzeBranch() 239 if (TBB != I->getOperand(0).getMBB()) in analyzeBranch() 254 MachineBasicBlock *TBB, in insertBranch() argument 260 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/ |
H A D | RISCVRedundantCopyElimination.cpp | 76 MachineBasicBlock *TBB) { in guaranteesZeroRegInBlock() argument 78 assert(TBB != nullptr && "Expected branch target basic block"); in guaranteesZeroRegInBlock() 81 Cond[2].getReg() == RISCV::X0 && TBB == &MBB) in guaranteesZeroRegInBlock() 84 Cond[2].getReg() == RISCV::X0 && TBB != &MBB) in guaranteesZeroRegInBlock() 100 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in optimizeBlock() local 102 if (TII->analyzeBranch(*PredMBB, TBB, FBB, Cond, /*AllowModify*/ false) || in optimizeBlock() 107 if (!guaranteesZeroRegInBlock(MBB, Cond, TBB)) in optimizeBlock()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AVR/ |
H A D | AVRInstrInfo.cpp | 265 MachineBasicBlock *&TBB, in analyzeBranch() argument 298 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 310 TBB = nullptr; in analyzeBranch() 318 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 368 FBB = TBB; in analyzeBranch() 369 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 377 assert(TBB); in analyzeBranch() 381 if (TBB != I->getOperand(0).getMBB()) { in analyzeBranch() 398 MachineBasicBlock *TBB, in insertBranch() argument 406 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/XCore/ |
H A D | XCoreInstrInfo.cpp | 190 MachineBasicBlock *&TBB, in analyzeBranch() argument 208 TBB = LastInst->getOperand(0).getMBB(); in analyzeBranch() 219 TBB = LastInst->getOperand(1).getMBB(); in analyzeBranch() 240 TBB = SecondLastInst->getOperand(1).getMBB(); in analyzeBranch() 252 TBB = SecondLastInst->getOperand(0).getMBB(); in analyzeBranch() 272 MachineBasicBlock *TBB, in insertBranch() argument 278 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 286 BuildMI(&MBB, DL, get(XCore::BRFU_lu6)).addMBB(TBB); in insertBranch() 291 .addMBB(TBB); in insertBranch() 300 .addMBB(TBB); in insertBranch()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARC/ |
H A D | ARCInstrInfo.cpp | 171 MachineBasicBlock *&TBB, in analyzeBranch() argument 175 TBB = FBB = nullptr; in analyzeBranch() 199 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 206 FBB = TBB; in analyzeBranch() 207 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 370 MachineBasicBlock *TBB, in insertBranch() argument 377 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 382 BuildMI(&MBB, DL, get(ARC::BR)).addMBB(TBB); in insertBranch() 387 MIB.addMBB(TBB); in insertBranch()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
H A D | HexagonBranchRelaxation.cpp | 162 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in isJumpOutOfRange() local 166 if (HII->analyzeBranch(B, TBB, FBB, Cond, false)) { in isJumpOutOfRange() 171 TBB = FirstTerm->getOperand(HII->getCExtOpNum(*FirstTerm)).getMBB(); in isJumpOutOfRange() 173 if (TBB && &MI == &*FirstTerm) { in isJumpOutOfRange() 174 Distance = std::abs((long long)InstOffset - BlockToInstOffset[TBB]) in isJumpOutOfRange()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/ |
H A D | BPFInstrInfo.cpp | 167 MachineBasicBlock *&TBB, in analyzeBranch() argument 192 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 203 TBB = nullptr; in analyzeBranch() 210 TBB = I->getOperand(0).getMBB(); in analyzeBranch() 221 MachineBasicBlock *TBB, in insertBranch() argument 229 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 234 BuildMI(&MBB, DL, get(BPF::JMP)).addMBB(TBB); in insertBranch()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/ |
H A D | SPIRVInstrInfo.cpp | 183 MachineBasicBlock *&TBB, in analyzeBranch() argument 187 TBB = nullptr; in analyzeBranch() 195 TBB = MI->getOperand(0).getMBB(); in analyzeBranch() 199 TBB = MI->getOperand(1).getMBB(); in analyzeBranch() 234 MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, in insertBranch() argument
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
H A D | MipsInstrInfo.cpp | 109 MachineBasicBlock *&TBB, in analyzeBranch() argument 114 BranchType BT = analyzeBranch(MBB, TBB, FBB, Cond, AllowModify, BranchInstrs); in analyzeBranch() 119 void MipsInstrInfo::BuildCondBr(MachineBasicBlock &MBB, MachineBasicBlock *TBB, in BuildCondBr() argument 131 MIB.addMBB(TBB); in BuildCondBr() 135 MachineBasicBlock *TBB, in insertBranch() argument 141 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 154 BuildCondBr(MBB, TBB, DL, Cond); in insertBranch() 162 BuildMI(&MBB, DL, get(UncondBrOpc)).addMBB(TBB); in insertBranch() 164 BuildCondBr(MBB, TBB, DL, Cond); in insertBranch() 205 MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, in analyzeBranch() argument [all …]
|
H A D | MipsInstrInfo.h | 63 bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, 71 unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, 79 BranchType analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, 208 void BuildCondBr(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
/freebsd/contrib/llvm-project/llvm/lib/Target/M68k/ |
H A D | M68kInstrInfo.cpp | 84 MachineBasicBlock *&TBB, in AnalyzeBranchImpl() argument 126 TBB = UncondBranch.second; in AnalyzeBranchImpl() 139 TBB = nullptr; in AnalyzeBranchImpl() 206 TBB = UncondBranch.second; in AnalyzeBranchImpl() 212 TBB = CondBranchTarget; in AnalyzeBranchImpl() 221 TBB = CondBranchTarget; in AnalyzeBranchImpl() 232 assert(TBB); in AnalyzeBranchImpl() 239 if (OldBranchCode == BranchCode && TBB == NewTBB) in AnalyzeBranchImpl() 250 MachineBasicBlock *&TBB, in analyzeBranch() argument 254 return AnalyzeBranchImpl(MBB, TBB, FBB, Cond, AllowModify); in analyzeBranch() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64ConditionOptimizer.cpp | 349 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in runOnMachineFunction() local 350 if (TII->analyzeBranch(*HBB, TBB, FBB, HeadCond)) { in runOnMachineFunction() 355 if (!TBB || TBB == HBB) { in runOnMachineFunction() 361 if (TII->analyzeBranch(*TBB, TBB_TBB, TBB_FBB, TrueCond)) { in runOnMachineFunction() 370 MachineInstr *TrueCmpMI = findSuitableCompare(TBB); in runOnMachineFunction()
|
H A D | AArch64SpeculationHardening.cpp | 152 bool endsWithCondControlFlow(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, 187 MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, in endsWithCondControlFlow() argument 190 if (TII->analyzeBranch(MBB, TBB, FBB, analyzeBranchCondCode, false)) in endsWithCondControlFlow() 200 assert(TBB != nullptr); in endsWithCondControlFlow() 207 if (TBB == FBB) in endsWithCondControlFlow() 245 MachineBasicBlock *TBB = nullptr; in instrumentControlFlow() local 249 if (!endsWithCondControlFlow(MBB, TBB, FBB, CondCode)) { in instrumentControlFlow() 258 MachineBasicBlock *SplitEdgeTBB = MBB.SplitCriticalEdge(TBB, *this); in instrumentControlFlow()
|
H A D | AArch64ConditionalCompares.cpp | 499 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in canConvert() local 500 if (TII->analyzeBranch(*Head, TBB, FBB, HeadCond)) { in canConvert() 508 if (!TBB || HeadCond.empty()) { in canConvert() 522 if (TBB != CmpBB) { in canConvert() 523 assert(TBB == Tail && "Unexpected TBB"); in canConvert() 528 TBB = FBB = nullptr; in canConvert() 529 if (TII->analyzeBranch(*CmpBB, TBB, FBB, CmpBBCond)) { in canConvert() 535 if (!TBB || CmpBBCond.empty()) { in canConvert() 548 if (TBB != Tail) in canConvert()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/LoongArch/ |
H A D | LoongArchInstrInfo.cpp | 268 MachineBasicBlock *&TBB, in analyzeBranch() argument 272 TBB = FBB = nullptr; in analyzeBranch() 305 TBB = getBranchDestBlock(*I); in analyzeBranch() 311 parseCondBranch(*I, TBB, Cond); in analyzeBranch() 318 parseCondBranch(*std::prev(I), TBB, Cond); in analyzeBranch() 384 MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, in insertBranch() argument 390 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 396 MachineInstr &MI = *BuildMI(&MBB, DL, get(LoongArch::PseudoBR)).addMBB(TBB); in insertBranch() 406 MIB.addMBB(TBB); in insertBranch()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Sparc/ |
H A D | SparcInstrInfo.cpp | 245 MachineBasicBlock *&TBB, in analyzeBranch() argument 263 TBB = LastInst->getOperand(0).getMBB(); in analyzeBranch() 268 parseCondBranch(LastInst, TBB, Cond); in analyzeBranch() 287 TBB = LastInst->getOperand(0).getMBB(); in analyzeBranch() 302 parseCondBranch(SecondLastInst, TBB, Cond); in analyzeBranch() 310 TBB = SecondLastInst->getOperand(0).getMBB(); in analyzeBranch() 328 MachineBasicBlock *TBB, in insertBranch() argument 333 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 339 BuildMI(&MBB, DL, get(SP::BA)).addMBB(TBB); in insertBranch() 350 BuildMI(&MBB, DL, get(Opc)).addMBB(TBB).addImm(CC).addReg(Reg); in insertBranch() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/CSKY/ |
H A D | CSKYInstrInfo.cpp | 46 MachineBasicBlock *&TBB, in analyzeBranch() argument 50 TBB = FBB = nullptr; in analyzeBranch() 91 TBB = getBranchDestBlock(*I); in analyzeBranch() 97 parseCondBranch(*I, TBB, Cond); in analyzeBranch() 104 parseCondBranch(*std::prev(I), TBB, Cond); in analyzeBranch() 155 MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, in insertBranch() argument 161 assert(TBB && "insertBranch must not be told to insert a fallthrough"); in insertBranch() 167 MachineInstr &MI = *BuildMI(&MBB, DL, get(CSKY::BR32)).addMBB(TBB); in insertBranch() 175 MachineInstr &CondMI = *BuildMI(&MBB, DL, get(Opc)).add(Cond[1]).addMBB(TBB); in insertBranch()
|