| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyLateEHPrepare.cpp | 78 if (MBB->isEHPad()) { in getMatchingEHPad() 81 EHPad = MBB; in getMatchingEHPad() 101 if (Deleted.count(MBB) || !MBB->pred_empty()) in eraseDeadBBsAndChildren() 104 WL.append(MBB->succ_begin(), MBB->succ_end()); in eraseDeadBBsAndChildren() 109 Deleted.insert(MBB); in eraseDeadBBsAndChildren() 141 for (auto &MBB : MF) in removeUnreachableEHPads() local 142 if (MBB.isEHPad() && MBB.pred_empty()) in removeUnreachableEHPads() 153 for (auto &MBB : MF) { in recordCatchRetBBs() local 178 for (auto &MBB : MF) in hoistCatches() local 206 if (!MBB.isEHPad()) in addCatchAlls() [all …]
|
| H A D | WebAssemblyCFGSort.cpp | 96 MachineFunction *MF = MBB->getParent(); in maybeUpdateTerminator() 197 for (MachineBasicBlock &MBB : MF) { in sortBlocks() 198 unsigned N = MBB.pred_size(); in sortBlocks() 200 if (L->getHeader() == &MBB) in sortBlocks() 204 NumPredsLeft[MBB.getNumber()] = N; in sortBlocks() 231 if (R->getHeader() == MBB) in sortBlocks() 310 maybeUpdateTerminator(MBB); in sortBlocks() 327 Next->moveAfter(MBB); in sortBlocks() 328 maybeUpdateTerminator(MBB); in sortBlocks() 329 MBB = Next; in sortBlocks() [all …]
|
| H A D | WebAssemblyCFGStackify.cpp | 253 assert(!MBB.isEHPad()); in placeBlockMarker() 364 for (auto &MI : MBB) { in placeBlockMarker() 389 MachineInstr *End = BuildMI(MBB, InsertPos, MBB.findPrevDebugLoc(InsertPos), in placeBlockMarker() 435 MachineInstr *Begin = BuildMI(MBB, InsertPos, MBB.findDebugLoc(InsertPos), in placeLoopMarker() 466 assert(MBB.isEHPad()); in placeTryMarker() 701 for (auto &MBB : MF) { in removeUnnecessaryInstrs() local 702 if (!MBB.isEHPad()) in removeUnnecessaryInstrs() 755 for (auto &MBB : MF) { in removeUnnecessaryInstrs() local 1457 updateScopeTops(EHPadToTry[&MBB]->getParent(), &MBB); in recalculateScopeTops() 1541 for (auto &MBB : MF) in placeMarkers() local [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/LoongArch/ |
| H A D | LoongArchExpandPseudoInsts.cpp | 91 for (auto &MBB : MF) in runOnMachineFunction() local 92 Modified |= expandMBB(MBB); in runOnMachineFunction() 99 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 329 for (auto &MBB : MF) in runOnMachineFunction() local 330 Modified |= expandMBB(MBB); in runOnMachineFunction() 338 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 413 SinkBB->splice(SinkBB->end(), &MBB, MI, MBB.end()); in expandCopyCFR() 414 SinkBB->transferSuccessors(&MBB); in expandCopyCFR() 416 MBB.addSuccessor(FalseBB); in expandCopyCFR() 417 MBB.addSuccessor(SinkBB); in expandCopyCFR() [all …]
|
| H A D | LoongArchExpandAtomicPseudoInsts.cpp | 69 for (auto &MBB : MF) in runOnMachineFunction() local 70 Modified |= expandMBB(MBB); in runOnMachineFunction() 77 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 318 DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); in expandAtomicBinOp() 320 MBB.addSuccessor(LoopMBB); in expandAtomicBinOp() 328 NextMBBI = MBB.end(); in expandAtomicBinOp() 377 DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); in expandAtomicMinMaxOp() 379 MBB.addSuccessor(LoopHeadMBB); in expandAtomicMinMaxOp() 457 NextMBBI = MBB.end(); in expandAtomicMinMaxOp() 492 DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); in expandAtomicCmpXchg() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86PreTileConfig.cpp | 61 MIRef(MachineBasicBlock *MBB) : MBB(MBB) { in MIRef() 62 for (auto I = MBB->begin(), E = MBB->end(); I != E && I->isPHI(); in MIRef() 70 : MI(MI), MBB(MBB), in MIRef() 73 : MI(MI), MBB(MBB), Pos(Pos) {} in MIRef() 76 return MI == RHS.MI && MBB == RHS.MBB; in operator ==() 82 return MBB < RHS.MBB || (MBB == RHS.MBB && Pos < RHS.Pos); in operator <() 87 return MBB > RHS.MBB || (MBB == RHS.MBB && Pos > RHS.Pos); in operator >() 212 MIRef MIR(MI, MBB); in INITIALIZE_PASS_DEPENDENCY() 267 BBVisitedInfo[&MBB].FirstAMX = MIRef(&MI, &MBB, Pos); in runOnMachineFunction() 270 BBVisitedInfo[&MBB].LastCall = MIRef(&MI, &MBB, Pos); in runOnMachineFunction() [all …]
|
| H A D | X86IndirectBranchTracking.cpp | 81 BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(EndbrOpcode)); in addENDBR() 142 auto MBB = MF.begin(); in runOnMachineFunction() local 143 Changed |= addENDBR(*MBB, MBB->begin()); in runOnMachineFunction() 146 for (auto &MBB : MF) { in runOnMachineFunction() local 149 if (MBB.hasAddressTaken()) in runOnMachineFunction() 150 Changed |= addENDBR(MBB, MBB.begin()); in runOnMachineFunction() 152 for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) { in runOnMachineFunction() 163 for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) { in runOnMachineFunction() 165 if (MBB.isEHPad()) { in runOnMachineFunction() 180 } else if (MBB.isEHPad()){ in runOnMachineFunction() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | BranchRelaxation.cpp | 163 for (auto &MBB : *MF) { in dumpBBs() 186 BlockInfo[MBB.getNumber()].Size = computeBlockSize(MBB); in scanFunction() 231 for (auto &MBB : in adjustBlockOffsets() local 388 adjustBlockOffsets(*MBB); in fixupConditionalBranch() 427 removeBranch(MBB); in fixupConditionalBranch() 465 removeBranch(MBB); in fixupConditionalBranch() 490 removeBranch(MBB); in fixupConditionalBranch() 531 removeBranch(MBB); in fixupConditionalBranch() 558 if (!MBB->empty()) { in fixupUnconditionalBranch() 593 adjustBlockOffsets(*MBB); in fixupUnconditionalBranch() [all …]
|
| H A D | BranchFolding.cpp | 165 MBB->removeSuccessor(MBB->succ_end()-1); in RemoveDeadBlock() 612 if (!MBB->succ_empty() && !MBB->canFallThrough()) in ProfitableToMerge() 949 if ((MBB == EntryBB || MBB->isEHPad()) && in TryTailMergeBlocks() 1346 if (IsEmptyBlock(MBB) && !MBB->isEHPad() && !MBB->hasAddressTaken() && in OptimizeBlock() 1415 !MBB->hasAddressTaken() && !MBB->isEHPad()) { in OptimizeBlock() 1434 PrevBB.splice(PrevBB.end(), MBB, MBB->begin(), MBB->end()); in OptimizeBlock() 1581 IsBranchOnlyBlock(MBB) && CurTBB != MBB && in OptimizeBlock() 1594 MBB->erase(MBB->begin(), MBB->end()); in OptimizeBlock() 1608 PriorTBB != MBB && PriorFBB != MBB) { in OptimizeBlock() 1696 (PredTBB == MBB || PredFBB == MBB) && in OptimizeBlock() [all …]
|
| H A D | ReachingDefAnalysis.cpp | 66 if (MBB->pred_empty()) { in enterBasicBlock() 154 instructionsWithoutDebug(MBB->instr_begin(), MBB->instr_end()); in reprocessBasicBlock() 194 MachineBasicBlock *MBB = TraversedMBB.MBB; in processBasicBlock() local 205 enterBasicBlock(MBB); in processBasicBlock() 207 instructionsWithoutDebug(MBB->instr_begin(), MBB->instr_end())) in processBasicBlock() 209 leaveBasicBlock(MBB); in processBasicBlock() 310 for (auto &MI : *MBB) { in getInstFromId() 359 instructionsWithoutDebug(MBB->instr_begin(), MBB->instr_end())) { in getLiveInUses() 369 if (Last == MBB->end()) in getLiveInUses() 390 if (Visited.count(MBB) || !MBB->isLiveIn(PhysReg)) in getGlobalUses() [all …]
|
| H A D | BasicBlockSections.cpp | 144 for (auto &MBB : MF) { in INITIALIZE_PASS_DEPENDENCY() local 154 TII->insertUnconditionalBranch(MBB, FTMBB, MBB.findBranchDebugLoc()); in INITIALIZE_PASS_DEPENDENCY() 158 if (MBB.isEndSection()) in INITIALIZE_PASS_DEPENDENCY() 190 for (auto &MBB : MF) { in assignSections() local 201 MBB.setSectionID(MBB.getNumber()); in assignSections() 213 if (MBB.isEHPad() && EHPadsSectionID != MBB.getSectionID() && in assignSections() 226 for (auto &MBB : MF) in assignSections() local 227 if (MBB.isEHPad()) in assignSections() 235 for (auto &MBB : MF) in sortBasicBlocksAndUpdateBranches() local 257 for (auto &MBB : MF) { in avoidZeroOffsetLandingPad() local [all …]
|
| H A D | GCEmptyBasicBlocks.cpp | 53 for (MachineFunction::iterator MBB = MF.begin(), in runOnMachineFunction() local 56 MBB != LastMBB; MBB = NextMBB) { in runOnMachineFunction() 57 NextMBB = std::next(MBB); in runOnMachineFunction() 61 if (MBB->isEHPad() || MBB->hasAddressTaken()) in runOnMachineFunction() 71 LLVM_DEBUG(dbgs() << "Removing basic block " << MBB->getName() in runOnMachineFunction() 73 << *MBB << "\n"); in runOnMachineFunction() 77 Pred->ReplaceUsesOfBlockWith(&*MBB, &*NextMBB); in runOnMachineFunction() 80 JTI->ReplaceMBBInJumpTables(&*MBB, &*NextMBB); in runOnMachineFunction() 82 while (!MBB->succ_empty()) in runOnMachineFunction() 83 MBB->removeSuccessor(MBB->succ_end() - 1); in runOnMachineFunction() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | R600MachineCFGStructurizer.cpp | 398 bool MultiplePreds = MBB && (MBB->pred_size() > 1); in needMigrateBlock() 411 if (I == MBB.end()) in reversePredicateSetter() 438 MBB->push_back(MI); in insertInstrEnd() 448 if (!MBB->empty()) in insertInstrBefore() 449 MBB->insert(MBB->begin(), MI); in insertInstrBefore() 451 MBB->push_back(MI); in insertInstrBefore() 759 MBB = *It; in run() 940 reversePredicateSetter(MBB->end(), *MBB); in ifPatternMatch() 1315 if (MBB != TrueMBB && MBB != FalseMBB) in improveSimpleJumpintoIf() 1507 << "BB" << MBB->getNumber() << "size " << MBB->size() in cloneBlockForPredecessor() [all …]
|
| H A D | SILowerControlFlow.cpp | 186 if (MBB == End || !Visited.insert(MBB).second) in hasKill() 191 Worklist.append(MBB->succ_begin(), MBB->succ_end()); in hasKill() 457 return MBB.end(); in skipIgnoreExecInstsTrivialSucc() 469 return MBB.end(); in skipIgnoreExecInstsTrivialSucc() 704 I = MBB.end(); in process() 720 MachineInstr *InitMI = BuildMI(*MBB, MBB->begin(), MI.getDebugLoc(), in lowerInitExec() 832 MBB.clear(); in removeMBBifRedundant() 833 MBB.eraseFromParent(); in removeMBBifRedundant() 887 for (auto &MBB : MF) { in runOnMachineFunction() local 914 E = MBB->end(); in runOnMachineFunction() [all …]
|
| H A D | SILowerI1Copies.cpp | 163 if (MBB == &DefBlock) { in analyze() 173 if (TII->hasDivergentBranch(MBB) && PDT.dominates(&DefBlock, MBB)) in analyze() 196 ReachableMap[MBB] = true; in analyze() 277 DefBlock = &MBB; in initialize() 372 Visited[MBB] = Level; in advanceLevel() 426 BuildMI(*MBB, MBB->getFirstTerminator(), {}, TII->get(AMDGPU::IMPLICIT_DEF), in insertUndefLaneMask() 552 if (&MBB != PrevMBB) { in lowerPhis() 553 LF.initialize(MBB); in lowerPhis() 554 PrevMBB = &MBB; in lowerPhis() 617 MBB, insertUndefLaneMask(MBB, MRI, LaneMaskRegAttrs)); in lowerPhis() [all …]
|
| H A D | AMDGPUSetWavePriority.cpp | 128 for (MachineInstr &MI : *MBB) { in runOnMachineFunction() 131 MBBInfo &Info = MBBInfos[MBB]; in runOnMachineFunction() 155 MBBInfo &Info = MBBInfos[MBB]; in runOnMachineFunction() 180 for (MachineBasicBlock &MBB : MF) { in runOnMachineFunction() 181 if (MBBInfos[&MBB].MayReachVMEMLoad) { in runOnMachineFunction() 182 if (MBB.succ_empty()) in runOnMachineFunction() 183 PriorityLoweringBlocks.insert(&MBB); in runOnMachineFunction() 201 PriorityLoweringBlocks.insert(&MBB); in runOnMachineFunction() 206 *MBB, in runOnMachineFunction() 207 MBBInfos[MBB].LastVMEMLoad in runOnMachineFunction() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64SpeculationHardening.cpp | 202 FBB = MBB.getFallThrough(); in endsWithCondControlFlow() 265 if (MBB.instr_end() != MBB.instr_begin()) in instrumentControlFlow() 289 RS.enterBasicBlockEnd(MBB); in instrumentControlFlow() 291 for (MachineBasicBlock::iterator I = MBB.end(); I != MBB.begin(); ) { in instrumentControlFlow() 299 if (I == MBB.begin()) in instrumentControlFlow() 300 RS.enterBasicBlock(MBB); in instrumentControlFlow() 327 insertFullSpeculationBarrier(MBB, MBB.begin(), in instrumentControlFlow() 468 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in slhLoads() 619 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in lowerSpeculationSafeValuePseudos() 673 for (auto &MBB : MF) in runOnMachineFunction() local [all …]
|
| H A D | AArch64BranchTargets.cpp | 75 for (auto *MBB : JTE.MBBs) in runOnMachineFunction() local 76 JumpTableTargets.insert(MBB); in runOnMachineFunction() 80 for (MachineBasicBlock &MBB : MF) { in runOnMachineFunction() 91 if (&MBB == &*MF.begin()) in runOnMachineFunction() 96 if (MBB.hasAddressTaken() || JumpTableTargets.count(&MBB)) in runOnMachineFunction() 100 addBTI(MBB, CouldCall, CouldJump, HasWinCFI); in runOnMachineFunction() 124 auto MBBI = MBB.begin(); in addBTI() 127 for (; MBBI != MBB.end() && in addBTI() 134 if (MBBI != MBB.end() && HintNum == 34 && in addBTI() 140 BuildMI(MBB, MBB.begin(), MBB.findDebugLoc(MBB.begin()), in addBTI() [all …]
|
| H A D | AArch64ExpandPseudoInsts.cpp | 280 DoneBB->splice(DoneBB->end(), &MBB, MI, MBB.end()); in expandCMP_SWAP() 285 NextMBBI = MBB.end(); in expandCMP_SWAP() 412 DoneBB->splice(DoneBB->end(), &MBB, MI, MBB.end()); in expandCMP_SWAP_128() 417 NextMBBI = MBB.end(); in expandCMP_SWAP_128() 726 DoneBB->splice(DoneBB->end(), &MBB, MI, MBB.end()); in expandSetTagLoop() 731 NextMBBI = MBB.end(); in expandSetTagLoop() 991 return &MBB; in expandCondSMToggle() 1537 if (NewMBB != &MBB) in expandMI() 1543 if (NewMBB != &MBB) in expandMI() 1690 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/RISCV/ |
| H A D | RISCVExpandPseudoInsts.cpp | 59 for (auto &MBB : MF) in getInstSizeInBytes() local 60 for (auto &MI : MBB) in getInstSizeInBytes() 78 for (auto &MBB : MF) in runOnMachineFunction() local 91 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 244 MergeBB->splice(MergeBB->end(), &MBB, MI, MBB.end()); in expandCCOp() 247 MBB.addSuccessor(TrueBB); in expandCCOp() 250 NextMBBI = MBB.end(); in expandCCOp() 434 for (auto &MBB : MF) in getInstSizeInBytes() local 435 for (auto &MI : MBB) in getInstSizeInBytes() 453 for (auto &MBB : MF) in runOnMachineFunction() local [all …]
|
| H A D | RISCVInsertWriteVXRM.cpp | 245 if (MBB.pred_empty()) { in computeAvailable() 287 if (MBB.succ_empty()) { in computeAnticipated() 337 if (MBB.isEntryBlock()) { in emitWriteVXRM() 367 for (MachineInstr &MI : MBB) { in emitWriteVXRM() 408 BuildMI(MBB, MBB.getFirstTerminator(), DebugLoc(), in emitWriteVXRM() 437 WorkList.push(&MBB); in runOnMachineFunction() 443 computeAvailable(MBB); in runOnMachineFunction() 448 WorkList.push(&MBB); in runOnMachineFunction() 454 computeAnticipated(MBB); in runOnMachineFunction() 458 for (MachineBasicBlock &MBB : MF) in runOnMachineFunction() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AVR/ |
| H A D | AVRExpandPseudoInsts.cpp | 52 bool expandMBB(Block &MBB); 113 BlockIt MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 130 for (Block &MBB : MF) { in runOnMachineFunction() 163 buildMI(MBB, MBBI, OpLo) in expandArith() 197 buildMI(MBB, MBBI, Op) in expandLogic() 206 buildMI(MBB, MBBI, Op) in expandLogic() 508 buildMI(MBB, MBBI, OpLo) in expand() 1454 buildMI(MBB, MBBI, OpLo) in expand() 1459 buildMI(MBB, MBBI, OpHi) in expand() 1573 buildMI(MBB, MBBI, OpLo) in expand() [all …]
|
| H A D | AVRFrameLowering.cpp | 184 restoreStatusRegister(MF, MBB); in emitEpilogue() 189 while (MBBI != MBB.begin()) { in emitEpilogue() 223 restoreStatusRegister(MF, MBB); in emitEpilogue() 251 DebugLoc DL = MBB.findDebugLoc(MI); in spillCalleeSavedRegisters() 267 MBB.addLiveIn(Reg); in spillCalleeSavedRegisters() 278 MBB.addLiveIn(Reg); in spillCalleeSavedRegisters() 300 DebugLoc DL = MBB.findDebugLoc(MI); in restoreCalleeSavedRegisters() 354 return MBB.erase(MI); in eliminateCallFramePseudoInstr() 362 return MBB.erase(MI); in eliminateCallFramePseudoInstr() 385 fixStackStores(MBB, MI, TII); in eliminateCallFramePseudoInstr() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/Mips/ |
| H A D | MipsSEFrameLowering.cpp | 107 for (auto &MBB : MF) { in expand() local 108 for (Iter I = MBB.begin(), End = MBB.end(); I != End;) in expand() 118 expandLoadCCond(MBB, I); in expandInstr() 121 expandStoreCCond(MBB, I); in expandInstr() 141 MBB.erase(I); in expandInstr() 145 MBB.erase(I); in expandInstr() 149 MBB.erase(I); in expandInstr() 153 MBB.erase(I); in expandInstr() 156 if (!expandCopy(MBB, I)) in expandInstr() 163 MBB.erase(I); in expandInstr() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/MSP430/ |
| H A D | MSP430FrameLowering.cpp | 75 BuildCFI(MBB, MBBI, DL, in emitCalleeSavedFrameMoves() 117 BuildCFI(MBB, MBBI, DL, in emitPrologue() 124 MBB, MBBI, DL, in emitPrologue() 135 BuildCFI(MBB, MBBI, DL, in emitPrologue() 162 if (MBBI != MBB.end()) in emitPrologue() 185 MBB, MBBI, DL, in emitPrologue() 227 BuildCFI(MBB, MBBI, DL, in emitEpilogue() 231 if (!MBB.succ_empty() && !MBB.isReturnBlock()) { in emitEpilogue() 333 MBB.addLiveIn(Reg); in spillCalleeSavedRegisters() 420 MBB.insert(I, New); in eliminateCallFramePseudoInstr() [all …]
|