| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyLateEHPrepare.cpp | 77 Visited.insert(MBB); in getMatchingEHPad() 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() 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 | WebAssemblyFixBrTableDefaults.cpp | 91 auto *HeaderMBB = *MBB->pred_begin(); in fixBrTableDefault() 111 if (TBB && TBB != MBB) { in fixBrTableDefault() 135 HeaderMBB->splice(HeaderMBB->end(), MBB, MBB->begin(), MBB->end()); in fixBrTableDefault() 139 HeaderMBB->removeSuccessor(MBB); in fixBrTableDefault() 140 for (auto &Succ : MBB->successors()) in fixBrTableDefault() 146 MF.erase(MBB); in fixBrTableDefault() 158 for (auto &MBB : MF) in runOnMachineFunction() local 159 MBBSet.insert(&MBB); in runOnMachineFunction() 163 MBBSet.erase(MBB); in runOnMachineFunction() 164 for (auto &MI : *MBB) { in runOnMachineFunction() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86PreTileConfig.cpp | 55 MIRef(MachineBasicBlock *MBB) : MBB(MBB) { in MIRef() 56 for (auto I = MBB->begin(), E = MBB->end(); I != E && I->isPHI(); in MIRef() 64 : MI(MI), MBB(MBB), in MIRef() 67 : MI(MI), MBB(MBB), Pos(Pos) {} in MIRef() 70 return MI == RHS.MI && MBB == RHS.MBB; in operator ==() 76 return MBB < RHS.MBB || (MBB == RHS.MBB && Pos < RHS.Pos); in operator <() 81 return MBB > RHS.MBB || (MBB == RHS.MBB && Pos > RHS.Pos); in operator >() 206 MIRef MIR(MI, MBB); in INITIALIZE_PASS_DEPENDENCY() 260 BBVisitedInfo[&MBB].FirstAMX = MIRef(&MI, &MBB, Pos); in runOnMachineFunction() 263 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() 129 auto MBB = MF.begin(); in runOnMachineFunction() local 130 Changed |= addENDBR(*MBB, MBB->begin()); in runOnMachineFunction() 133 for (auto &MBB : MF) { in runOnMachineFunction() local 136 if (MBB.hasAddressTaken()) in runOnMachineFunction() 137 Changed |= addENDBR(MBB, MBB.begin()); in runOnMachineFunction() 139 for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) { in runOnMachineFunction() 148 for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) { in runOnMachineFunction() 150 if (MBB.isEHPad()) { in runOnMachineFunction() 165 } else if (MBB.isEHPad()){ in runOnMachineFunction() [all …]
|
| H A D | X86VZeroUpper.cpp | 65 void processBasicBlock(MachineBasicBlock &MBB); 67 MachineBasicBlock &MBB); 68 void addDirtySuccessor(MachineBasicBlock &MBB); 193 DirtySuccessors.push_back(&MBB); in addDirtySuccessor() 204 BlockStates[MBB.getNumber()].FirstUnguardedCall = MBB.end(); in processBasicBlock() 206 for (MachineInstr &MI : MBB) { in processBasicBlock() 257 insertVZeroUpper(MI, MBB); in processBasicBlock() 279 BlockStates[MBB.getNumber()].ExitState = CurState; in processBasicBlock() 323 for (MachineBasicBlock &MBB : MF) in runOnMachineFunction() 324 processBasicBlock(MBB); in runOnMachineFunction() [all …]
|
| H A D | X86PadShortFunction.cpp | 75 void findReturns(MachineBasicBlock *MBB, 78 bool cyclesUntilReturn(MachineBasicBlock *MBB, 81 void addPadding(MachineBasicBlock *MBB, 134 MachineBasicBlock *MBB = I->first; in runOnMachineFunction() local 145 assert(MBB->size() > 0 && in runOnMachineFunction() 167 bool hasReturn = cyclesUntilReturn(MBB, Cycles); in findReturns() 172 ReturnBBs[MBB] = std::max(ReturnBBs[MBB], Cycles); in findReturns() 178 I != MBB->succ_end(); ++I) { in findReturns() 179 if (*I == MBB) in findReturns() 193 = VisitedBBs.find(MBB); in cyclesUntilReturn() [all …]
|
| H A D | X86SpeculativeLoadHardening.cpp | 141 MachineBasicBlock *MBB; member 331 for (auto &MBB : MF) in canonicalizePHIOperands() local 332 for (auto &MI : MBB) { in canonicalizePHIOperands() 522 if (!MBB.isEHPad()) in runOnMachineFunction() 525 &MBB, in runOnMachineFunction() 526 extractPredStateFromSP(MBB, MBB.SkipPHIsAndLabels(MBB.begin()), Loc)); in runOnMachineFunction() 591 auto InsertPt = MBB->SkipPHIsAndLabels(MBB->begin()); in hardenEdgesWithLFENCE() 700 MachineBasicBlock &MBB = *Info.MBB; in tracePredStateThroughCFG() local 853 for (auto MII = MBB.instr_begin(), MIE = MBB.instr_end(); MII != MIE;) { in unfoldCallAndJumpLoads() 1101 MBB.dump(); in tracePredStateThroughIndirectBranches() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | BranchRelaxation.cpp | 139 for (auto &MBB : *MF) { in dumpBBs() 158 BlockInfo[MBB.getNumber()].Size = computeBlockSize(MBB); in scanFunction() 194 for (auto &MBB : in adjustBlockOffsets() local 327 adjustBlockOffsets(*MBB); in fixupConditionalBranch() 360 removeBranch(MBB); in fixupConditionalBranch() 385 removeBranch(MBB); in fixupConditionalBranch() 426 removeBranch(MBB); in fixupConditionalBranch() 450 if (!MBB->empty()) { in fixupUnconditionalBranch() 469 adjustBlockOffsets(*MBB); in fixupUnconditionalBranch() 479 MachineBasicBlock &MBB = *I; in relaxBranchInstructions() local [all …]
|
| H A D | BranchFolding.cpp | 161 MBB->removeSuccessor(MBB->succ_end()-1); in RemoveDeadBlock() 943 if ((MBB == EntryBB || MBB->isEHPad()) && in TryTailMergeBlocks() 1009 if (!TriedMerging.count(&MBB) && MBB.succ_empty()) in TailMergeBlocks() 1341 if (IsEmptyBlock(MBB) && !MBB->isEHPad() && !MBB->hasAddressTaken() && in OptimizeBlock() 1402 !MBB->hasAddressTaken() && !MBB->isEHPad()) { in OptimizeBlock() 1421 PrevBB.splice(PrevBB.end(), MBB, MBB->begin(), MBB->end()); in OptimizeBlock() 1567 IsBranchOnlyBlock(MBB) && CurTBB != MBB && in OptimizeBlock() 1580 MBB->erase(MBB->begin(), MBB->end()); in OptimizeBlock() 1594 PriorTBB != MBB && PriorFBB != MBB) { in OptimizeBlock() 1673 (PredTBB == MBB || PredFBB == MBB) && in OptimizeBlock() [all …]
|
| H A D | ReachingDefAnalysis.cpp | 60 if (MBB->pred_empty()) { in enterBasicBlock() 149 instructionsWithoutDebug(MBB->instr_begin(), MBB->instr_end()); in reprocessBasicBlock() 189 MachineBasicBlock *MBB = TraversedMBB.MBB; in processBasicBlock() local 200 enterBasicBlock(MBB); in processBasicBlock() 202 instructionsWithoutDebug(MBB->instr_begin(), MBB->instr_end())) in processBasicBlock() 204 leaveBasicBlock(MBB); in processBasicBlock() 305 for (auto &MI : *MBB) { in getInstFromId() 354 instructionsWithoutDebug(MBB->instr_begin(), MBB->instr_end())) { in getLiveInUses() 364 if (Last == MBB->end()) in getLiveInUses() 386 if (Visited.count(MBB) || !MBB->isLiveIn(PhysReg)) in getGlobalUses() [all …]
|
| H A D | MIRCanonicalizerPass.cpp | 128 MBB->splice(getPos(), MBB, II.second); in rescheduleLexographically() 153 for (auto &MI : *MBB) { in rescheduleCanonically() 238 const auto BBE = MBB->instr_end(); in rescheduleCanonically() 270 MBB->splice(UseI, MBB, DefI); in rescheduleCanonically() 280 if (UseI == MBB->instr_end()) in rescheduleCanonically() 286 MultiUsers[E.second], MBB, in rescheduleCanonically() 350 for (auto &MI : *MBB) { in doDefKillClear() 381 MBB->dump();); in runOnBasicBlock() 394 Changed |= doDefKillClear(MBB); in runOnBasicBlock() 421 for (auto MBB in runOnMachineFunction() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64SpeculationHardening.cpp | 202 FBB = MBB.getFallThrough(); in endsWithCondControlFlow() 210 assert(MBB.succ_size() == 2); in endsWithCondControlFlow() 265 if (MBB.instr_end() != MBB.instr_begin()) in instrumentControlFlow() 289 RS.enterBasicBlock(MBB); in instrumentControlFlow() 291 for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); I++) { in instrumentControlFlow() 299 if (I != MBB.begin()) in instrumentControlFlow() 325 insertFullSpeculationBarrier(MBB, MBB.begin(), in instrumentControlFlow() 466 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in slhLoads() 617 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in lowerSpeculationSafeValuePseudos() 671 for (auto &MBB : MF) in runOnMachineFunction() local [all …]
|
| H A D | AArch64LowerHomogeneousPrologEpilog.cpp | 191 MF.insert(MF.begin(), MBB); in createFrameHelperMachineFunction() 299 emitStore(MF, MBB, MBB.end(), TII, Regs[Size - 2], Regs[Size - 1], in getOrCreateFrameHelper() 308 emitStore(MF, MBB, MBB.end(), TII, Regs[I - 1], Regs[I], Size - I - 1, in getOrCreateFrameHelper() 312 BuildMI(MBB, MBB.end(), DebugLoc(), TII.get(AArch64::ADDXri)) in getOrCreateFrameHelper() 319 BuildMI(MBB, MBB.end(), DebugLoc(), TII.get(AArch64::RET)) in getOrCreateFrameHelper() 327 BuildMI(MBB, MBB.end(), DebugLoc(), TII.get(AArch64::ORRXrs)) in getOrCreateFrameHelper() 334 emitLoad(MF, MBB, MBB.end(), TII, Regs[I], Regs[I + 1], Size - I - 2, in getOrCreateFrameHelper() 337 emitLoad(MF, MBB, MBB.end(), TII, Regs[Size - 2], Regs[Size - 1], Size, in getOrCreateFrameHelper() 340 BuildMI(MBB, MBB.end(), DebugLoc(), TII.get(AArch64::RET)) in getOrCreateFrameHelper() 593 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in runOnMBB() [all …]
|
| H A D | AArch64BranchTargets.cpp | 74 for (auto *MBB : JTE.MBBs) in runOnMachineFunction() local 75 JumpTableTargets.insert(MBB); in runOnMachineFunction() 78 for (MachineBasicBlock &MBB : MF) { in runOnMachineFunction() 89 if (&MBB == &*MF.begin()) in runOnMachineFunction() 94 if (MBB.hasAddressTaken() || JumpTableTargets.count(&MBB)) in runOnMachineFunction() 98 addBTI(MBB, CouldCall, CouldJump); in runOnMachineFunction() 113 MBB.getParent()->getSubtarget().getInstrInfo()); in addBTI() 122 auto MBBI = MBB.begin(); in addBTI() 125 for (; MBBI != MBB.end() && in addBTI() 132 if (MBBI != MBB.end() && HintNum == 34 && in addBTI() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | AMDILCFGStructurizer.cpp | 395 bool MultiplePreds = MBB && (MBB->pred_size() > 1); in needMigrateBlock() 408 if (I == MBB.end()) in reversePredicateSetter() 435 MBB->push_back(MI); in insertInstrEnd() 445 if (!MBB->empty()) in insertInstrBefore() 446 MBB->insert(MBB->begin(), MI); in insertInstrBefore() 574 for (MachineBasicBlock::iterator It = MBB->begin(); It != MBB->end(); in getLastDebugLocInBB() 763 MBB = *It; in run() 948 reversePredicateSetter(MBB->end(), *MBB); in ifPatternMatch() 1325 if (MBB != TrueMBB && MBB != FalseMBB) in improveSimpleJumpintoIf() 1622 MBB->removeSuccessor(*MBB->succ_begin()); in removeSuccessor() [all …]
|
| H A D | SILowerControlFlow.cpp | 175 if (MBB == End || !Visited.insert(MBB).second) in hasKill() 180 Worklist.append(MBB->succ_begin(), MBB->succ_end()); in hasKill() 429 return MBB.end(); in skipIgnoreExecInstsTrivialSucc() 441 return MBB.end(); in skipIgnoreExecInstsTrivialSucc() 629 I = MBB.end(); in process() 645 BuildMI(*MBB, MBB->begin(), MI.getDebugLoc(), in lowerInitExec() 760 MBB.clear(); in removeMBBifRedundant() 761 MBB.eraseFromParent(); in removeMBBifRedundant() 811 for (auto &MBB : MF) { in runOnMachineFunction() local 837 E = MBB->end(); in runOnMachineFunction() [all …]
|
| H A D | SILowerI1Copies.cpp | 159 if (MBB == &DefBlock) { in analyze() 203 ReachableMap[MBB] = true; in analyze() 284 DefBlock = &MBB; in initialize() 373 NextLevel.push_back(MBB); in advanceLevel() 375 Visited[MBB] = Level; in advanceLevel() 429 BuildMI(MBB, MBB.getFirstTerminator(), {}, TII->get(AMDGPU::IMPLICIT_DEF), in insertUndefLaneMask() 557 if (&MBB != PrevMBB) { in lowerPhis() 558 LF.initialize(MBB); in lowerPhis() 559 PrevMBB = &MBB; in lowerPhis() 631 SSAUpdater.AddAvailableValue(MBB, insertUndefLaneMask(*MBB)); in lowerPhis() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/RISCV/ |
| H A D | RISCVExpandPseudoInsts.cpp | 43 bool expandMBB(MachineBasicBlock &MBB); 74 for (auto &MBB : MF) in runOnMachineFunction() local 75 Modified |= expandMBB(MBB); in runOnMachineFunction() 82 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 109 return expandVSetVL(MBB, MBBI); in expandMI() 139 return expandVSPILL(MBB, MBBI); in expandMI() 151 return expandVRELOAD(MBB, MBBI); in expandMI() 183 NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); in expandAuipcInstPair() 187 MBB.addSuccessor(NewMBB); in expandAuipcInstPair() 193 NextMBBI = MBB.end(); in expandAuipcInstPair() [all …]
|
| H A D | RISCVExpandAtomicPseudoInsts.cpp | 68 for (auto &MBB : MF) in runOnMachineFunction() local 69 Modified |= expandMBB(MBB); in runOnMachineFunction() 76 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 359 DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); in expandAtomicBinOp() 361 MBB.addSuccessor(LoopMBB); in expandAtomicBinOp() 369 NextMBBI = MBB.end(); in expandAtomicBinOp() 418 DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); in expandAtomicMinMaxOp() 420 MBB.addSuccessor(LoopHeadMBB); in expandAtomicMinMaxOp() 499 NextMBBI = MBB.end(); in expandAtomicMinMaxOp() 531 DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); in expandAtomicCmpXchg() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AVR/ |
| H A D | AVRExpandPseudoInsts.cpp | 60 bool expandMBB(Block &MBB); 73 MachineRegisterInfo &getRegInfo(Block &MBB) { return MBB.getParent()->getRegInfo(); } in getRegInfo() argument 114 BlockIt MBBI = MBB.begin(), E = MBB.end(); in expandMBB() 134 for (Block &MBB : MF) { in runOnMachineFunction() 166 buildMI(MBB, MBBI, OpLo) in expandArith() 483 buildMI(MBB, MBBI, OpLo) in expand() 923 RS.enterBasicBlock(MBB); in scavengeGPR8() 1272 buildMI(MBB, MBBI, OpLo) in expand() 1277 buildMI(MBB, MBBI, OpHi) in expand() 1380 buildMI(MBB, MBBI, OpLo) in expand() [all …]
|
| H A D | AVRFrameLowering.cpp | 181 restoreStatusRegister(MF, MBB); in emitEpilogue() 186 while (MBBI != MBB.begin()) { in emitEpilogue() 218 restoreStatusRegister(MF, MBB); in emitEpilogue() 245 DebugLoc DL = MBB.findDebugLoc(MI); in spillCalleeSavedRegisters() 246 MachineFunction &MF = *MBB.getParent(); in spillCalleeSavedRegisters() 262 MBB.addLiveIn(Reg); in spillCalleeSavedRegisters() 284 DebugLoc DL = MBB.findDebugLoc(MI); in restoreCalleeSavedRegisters() 344 return MBB.erase(MI); in eliminateCallFramePseudoInstr() 404 return MBB.erase(MI); in eliminateCallFramePseudoInstr() 514 for (MachineBasicBlock &MBB : MF) { in runOnMachineFunction() [all …]
|
| /freebsd-13.1/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-13.1/contrib/llvm-project/llvm/lib/Target/M68k/ |
| H A D | M68kFrameLowering.cpp | 146 if (MBBI == MBB.end()) in findDeadCallerSavedReg() 236 I = MBB.erase(I); in eliminateCallFramePseudoInstr() 264 BuildCFI(MBB, I, DL, in eliminateCallFramePseudoInstr() 279 BuildCFI(MBB, I, DL, in eliminateCallFramePseudoInstr() 310 MBB, I, DL, in eliminateCallFramePseudoInstr() 406 MBB.erase(PI); in mergeSPUpdates() 412 MBB.erase(PI); in mergeSPUpdates() 653 MBB, MBBI, DL, in emitPrologue() 681 if (MBBI != MBB.end()) in emitEpilogue() 684 if (MBBI != MBB.end()) in emitEpilogue() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
| H A D | SystemZPostRewrite.cpp | 65 bool selectMBB(MachineBasicBlock &MBB); 99 expandCondMove(MBB, MBBI, NextMBBI); in selectLOCRMux() 172 LiveRegs.addLiveOuts(MBB); in expandCondMove() 179 RestMBB->splice(RestMBB->begin(), &MBB, MI, MBB.end()); in expandCondMove() 180 RestMBB->transferSuccessors(&MBB); in expandCondMove() 195 MBB.addSuccessor(RestMBB); in expandCondMove() 196 MBB.addSuccessor(MoveMBB); in expandCondMove() 204 NextMBBI = MBB.end(); in expandCondMove() 253 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in selectMBB() 267 for (auto &MBB : MF) in runOnMachineFunction() local [all …]
|