|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
include/llvm/ADT/AllocatorList.h 119 reference operator*() const { return base_type::wrapped()->V; }
include/llvm/CodeGen/MachineBasicBlock.h 640 assert((I == instr_end() || I->getParent() == this) &&
644 while (I->isBundledWithSucc())
948 while (It != End && It->isDebugInstr())
959 while (It != Begin && It->isDebugInstr())
include/llvm/CodeGen/MachineInstrBundle.h 46 while (I->isBundledWithPred())
54 while (I->isBundledWithPred())
62 while (I->isBundledWithSucc())
71 while (I->isBundledWithSucc())
102 if (++InstrI == InstrE || !InstrI->isInsideBundle())
104 OpI = InstrI->operands_begin();
105 OpE = InstrI->operands_end();
124 OpI = InstrI->operands_begin();
125 OpE = InstrI->operands_end();
147 return OpI - InstrI->operands_begin();
include/llvm/CodeGen/MachineInstrBundleIterator.h 55 while (I->isBundledWithPred())
63 while (I->isBundledWithSucc())
133 assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
include/llvm/CodeGen/SlotIndexes.h 416 if (I->getInstr())
562 unsigned dist = ((nextItr->getIndex() - prevItr->getIndex())/2) & ~3u;
562 unsigned dist = ((nextItr->getIndex() - prevItr->getIndex())/2) & ~3u;
563 unsigned newNumber = prevItr->getIndex() + dist;
630 MBBRanges[prevMBB->getNumber()].second = startIdx;
include/llvm/IR/IRBuilder.h 152 SetCurrentDebugLocation(IP->getDebugLoc());
include/llvm/IR/InstIterator.h 63 BI = BB->begin();
96 while (BB == BBs->end() || BI == BB->begin()) {
98 BI = BB->end();
113 while (BI == BB->end()) {
116 BI = BB->begin();
lib/Analysis/AliasSetTracker.cpp 312 if (Cur->Forward)
315 AliasResult AR = Cur->aliasesPointer(Ptr, Size, AAInfo, AA);
339 if (Cur->Forward || !Cur->aliasesUnknownInst(Inst, AA))
339 if (Cur->Forward || !Cur->aliasesUnknownInst(Inst, AA))
lib/Analysis/InlineCost.cpp 1579 if (isa<ExtractElementInst>(I) || I->getType()->isVectorTy())
2095 if (isa<IndirectBrInst>(BI->getTerminator()))
2100 if (BI->hasAddressTaken())
lib/Analysis/Lint.cpp 643 std::prev(I.getIterator())->mayHaveSideEffects(),
lib/Analysis/Loads.cpp 299 if (isa<CallInst>(BBI) && BBI->mayWriteToMemory() &&
lib/Analysis/MemorySSA.cpp 1639 Defs->insert(InsertPt->getDefsIterator(), *What);
1647 Defs->insert(InsertPt->getDefsIterator(), *What);
lib/Analysis/ScalarEvolutionExpander.cpp 100 assert(!IP->isEHPad() && "unexpected eh pad!");
204 if (IP->getOpcode() == (unsigned)Opcode && IP->getOperand(0) == LHS &&
204 if (IP->getOpcode() == (unsigned)Opcode && IP->getOperand(0) == LHS &&
205 IP->getOperand(1) == RHS && !canGenerateIncompatiblePoison(&*IP))
212 DebugLoc Loc = Builder.GetInsertPoint()->getDebugLoc();
535 if (IP->getOpcode() == Instruction::GetElementPtr &&
536 IP->getOperand(0) == V && IP->getOperand(1) == Idx)
536 IP->getOperand(0) == V && IP->getOperand(1) == Idx)
lib/Bitcode/Writer/BitcodeWriter.cpp 3200 for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
3200 for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
3204 if (!I->getType()->isVoidTy())
3208 NeedsMetadataAttachment |= I->hasMetadataOtherThanDebugLoc();
3211 DILocation *DL = I->getDebugLoc();
4267 if (!F->isDeclaration())
lib/CodeGen/Analysis.cpp 547 if (BBI->mayHaveSideEffects() || BBI->mayReadFromMemory() ||
547 if (BBI->mayHaveSideEffects() || BBI->mayReadFromMemory() ||
lib/CodeGen/AsmPrinter/AsmPrinter.cpp 961 while (I != MBB->end() && I->isTransient())
lib/CodeGen/AsmPrinter/DwarfDebug.cpp 622 if (I->isCall())
643 if (I->getNumExplicitDefs() != 1 || ExplicitFwdRegDefs.empty())
lib/CodeGen/AsmPrinter/WinException.cpp 406 auto BlockBegin = Begin->begin();
407 auto BlockEnd = std::prev(End)->end();
455 MBBI = MFI->begin();
456 for (auto MBBE = MFI->end(); MBBI != MBBE; ++MBBI) {
599 while (Stop != End && !Stop->isEHFuncletEntry())
894 if (FuncletEnd->isEHFuncletEntry()) {
902 if (FuncletStart->isCleanupFuncletEntry())
912 cast<FuncletPadInst>(FuncletStart->getBasicBlock()->getFirstNonPHI());
1160 if (FuncletEnd->isEHFuncletEntry()) {
lib/CodeGen/AtomicExpandPass.cpp 864 std::prev(BB->end())->eraseFromParent();
1028 std::prev(BB->end())->eraseFromParent();
1185 std::prev(BB->end())->eraseFromParent();
1375 std::prev(BB->end())->eraseFromParent();
lib/CodeGen/BranchFolding.cpp 703 return (MBB != &*MF->begin()) && std::prev(I)->canFallThrough();
1123 if (I->pred_size() < 2) continue;
1146 for (MachineBasicBlock *PBB : I->predecessors()) {
1420 } else if (FallThrough->isEHPad()) {
1789 !SuccPrev->canFallThrough() && !CurUnAnalyzable &&
1814 !FallThrough->isEHPad() &&
lib/CodeGen/BranchRelaxation.cpp 128 unsigned PrevNum = MF->begin()->getNumber();
lib/CodeGen/CodeGenPrepare.cpp 5014 BasicBlock *BB = CurInstIterator->getParent();
lib/CodeGen/ExpandPostRAPseudos.cpp 192 for (MachineBasicBlock::iterator mi = mbbi->begin(), me = mbbi->end();
192 for (MachineBasicBlock::iterator mi = mbbi->begin(), me = mbbi->end();
lib/CodeGen/GCRootLowering.cpp 109 if (!I->isDeclaration() && I->hasGC())
109 if (!I->isDeclaration() && I->hasGC())
lib/CodeGen/IfConversion.cpp 1444 if (I == E || !I->empty() || !PI->isSuccessor(&*I))
1444 if (I == E || !I->empty() || !PI->isSuccessor(&*I))
1449 return PI->isSuccessor(&*I);
lib/CodeGen/InterferenceCache.cpp 211 MBBNum = MFI->getNumber();
lib/CodeGen/LiveDebugValues.cpp 886 for (const MachineOperand &MONext : NextI->operands()) {
lib/CodeGen/MIRParser/MIRParser.cpp 355 if (MILoc.Offset >= CallB->size())
360 auto CallI = std::next(CallB->instr_begin(), MILoc.Offset);
361 if (!CallI->isCall(MachineInstr::IgnoreBundle))
lib/CodeGen/MIRPrinter.cpp 477 CallLocation.BlockNum = CallI->getParent()->getNumber();
480 std::distance(CallI->getParent()->instr_begin(), CallI);
lib/CodeGen/MachineBasicBlock.cpp 99 I->AddRegOperandsToUseLists(RegInfo);
152 First->setParent(Parent);
162 while (I != E && I->isPHI())
164 assert((I == E || !I->isInsideBundle()) &&
211 while (I != B && ((--I)->isTerminator() || I->isDebugInstr()))
211 while (I != B && ((--I)->isTerminator() || I->isDebugInstr()))
213 while (I != E && !I->isTerminator())
229 if (I->isDebugInstr() || I->isInsideBundle())
229 if (I->isDebugInstr() || I->isInsideBundle())
997 if (!(--I)->addRegisterKilled(Reg, TRI, /* AddIfNotFound= */ false))
1028 I != E && I->isPHI(); ++I) {
1029 for (unsigned ni = 1, ne = I->getNumOperands(); ni != ne; ni += 2) {
1030 if (I->getOperand(ni+1).getMBB() == NMBB) {
1031 MachineOperand &MO = I->getOperand(ni);
1172 if (I != instr_end() && I->isBundledWithPred()) {
1202 if (!I->isTerminator()) break;
1206 for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
1207 if (I->getOperand(i).isMBB() &&
1208 I->getOperand(i).getMBB() == Old)
1209 I->getOperand(i).setMBB(New);
1295 return MBBI->getDebugLoc();
1305 if (!MBBI->isDebugInstr()) return MBBI->getDebugLoc();
1305 if (!MBBI->isDebugInstr()) return MBBI->getDebugLoc();
lib/CodeGen/MachineBlockPlacement.cpp 2571 if (!TII->analyzeBranch(*BB, TBB, FBB, Cond) || !FI->canFallThrough())
3073 if (!LayoutPred->isSuccessor(&*MBI))
3074 MBI->setAlignment(Align(1ULL << AlignAllNonFallThruBlocks));
lib/CodeGen/MachineFunction.cpp 219 I->Insts.clearAndLeakNodesUnsafely();
299 BlockNo = std::prev(MBBI)->getNumber() + 1;
302 if (MBBI->getNumber() != (int)BlockNo) {
304 if (MBBI->getNumber() != -1) {
305 assert(MBBNumbering[MBBI->getNumber()] == &*MBBI &&
307 MBBNumbering[MBBI->getNumber()] = nullptr;
315 MBBI->setNumber(BlockNo);
354 if (!I->isBundledWithSucc())
lib/CodeGen/MachineInstr.cpp 571 if (MII->getDesc().getFlags() & Mask) {
575 if (Type == AllInBundle && !MII->isBundle())
579 if (!MII->isBundledWithSucc())
601 while (I1->isBundledWithSucc() && I2->isBundledWithSucc()) {
601 while (I1->isBundledWithSucc() && I2->isBundledWithSucc()) {
604 if (!I1->isIdenticalTo(*I2, Check))
609 if (I1->isBundledWithSucc() || I2->isBundledWithSucc())
609 if (I1->isBundledWithSucc() || I2->isBundledWithSucc())
737 assert(!Pred->isBundledWithSucc() && "Inconsistent bundle flags");
738 Pred->setFlag(BundledSucc);
746 assert(!Succ->isBundledWithPred() && "Inconsistent bundle flags");
747 Succ->setFlag(BundledPred);
755 assert(Pred->isBundledWithSucc() && "Inconsistent bundle flags");
756 Pred->clearFlag(BundledSucc);
764 assert(Succ->isBundledWithPred() && "Inconsistent bundle flags");
765 Succ->clearFlag(BundledPred);
922 while (I->isBundledWithSucc()) {
lib/CodeGen/MachineInstrBundle.cpp 59 while (++MII != MIE && MII->isBundledWithPred()) {
60 MII->unbundleFromPred();
61 for (unsigned i = 0, e = MII->getNumOperands(); i != e; ++i) {
62 MachineOperand &MO = MII->getOperand(i);
113 if (MII->getDebugLoc().get())
114 return MII->getDebugLoc();
148 for (unsigned i = 0, e = MII->getNumOperands(); i != e; ++i) {
149 MachineOperand &MO = MII->getOperand(i);
231 if (MII->getFlag(MachineInstr::FrameSetup))
233 if (MII->getFlag(MachineInstr::FrameDestroy))
248 while (LastMI != E && LastMI->isInsideBundle())
264 assert(!MII->isInsideBundle() &&
268 if (!MII->isInsideBundle())
lib/CodeGen/MachineScheduler.cpp 524 && (int)SchedOnlyBlock != MBB->getNumber())
563 << " " << MBB->getName() << "\n From: " << *I
565 if (RegionEnd != MBB->end()) dbgs() << *RegionEnd;
570 errs() << ":%bb. " << MBB->getNumber();
571 errs() << " " << MBB->getName() << " \n";
lib/CodeGen/MachineVerifier.cpp 411 for (MachineBasicBlock::const_instr_iterator MBBI = MFI->instr_begin(),
412 MBBE = MFI->instr_end(); MBBI != MBBE; ++MBBI) {
413 if (MBBI->getParent() != &*MFI) {
420 if (InBundle && !MBBI->isBundledWithPred())
424 if (!InBundle && MBBI->isBundledWithPred())
430 if (!MBBI->isInsideBundle()) {
438 for (unsigned I = 0, E = MBBI->getNumOperands(); I != E; ++I) {
453 InBundle = MBBI->isBundledWithSucc();
458 report("BundledSucc flag set on last instruction in block", &MFI->back());
2622 if (!Register::isVirtualRegister(Reg) && MFI->isEHPad()) {
2634 for (MachineBasicBlock::const_pred_iterator PI = MFI->pred_begin(),
2635 PE = MFI->pred_end(); PI != PE; ++PI) {
lib/CodeGen/ModuloSchedule.cpp 712 if (MI->isInlineAsm()) {
719 if (!MI->isSafeToMove(nullptr, SawStore) && !MI->isPHI()) {
719 if (!MI->isSafeToMove(nullptr, SawStore) && !MI->isPHI()) {
724 for (MachineInstr::mop_iterator MOI = MI->operands_begin(),
725 MOE = MI->operands_end();
755 MI++->eraseFromParent();
1656 for (auto I = B->getFirstInstrTerminator()->getReverseIterator();
lib/CodeGen/ProcessImplicitDefs.cpp 100 for (MachineOperand &MO : UserMI->operands()) {
148 for (MachineBasicBlock::instr_iterator MBBI = MFI->instr_begin(),
149 MBBE = MFI->instr_end(); MBBI != MBBE; ++MBBI)
150 if (MBBI->isImplicitDef())
lib/CodeGen/PrologEpilogInserter.cpp 316 for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ++I)
316 for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ++I)
lib/CodeGen/SafeStack.cpp 772 IRBuilder<> IRB(&F.front(), F.begin()->getFirstInsertionPt());
lib/CodeGen/ScheduleDAGInstrs.cpp 1143 while (I->isBundledWithSucc())
1146 if (!I->isDebugInstr())
lib/CodeGen/SelectionDAG/FastISel.cpp 321 LocalMI.setDebugLoc(SinkPos->getDebugLoc());
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp 185 for (SDNode::value_iterator J = I->value_begin(), E = I->value_end();
185 for (SDNode::value_iterator J = I->value_begin(), E = I->value_end();
lib/CodeGen/ShadowStackGCLowering.cpp 237 for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E;)
237 for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E;)
305 IRBuilder<> AtEntry(IP->getParent(), IP);
312 AtEntry.SetInsertPoint(IP->getParent(), IP);
339 AtEntry.SetInsertPoint(IP->getParent(), IP);
lib/CodeGen/SjLjEHPrepare.cpp 229 BasicBlock::iterator AfterAllocaInsPt = F.begin()->begin();
lib/CodeGen/SlotIndexes.cpp 154 unsigned index = startItr->getIndex();
156 curItr->setIndex(index += Space);
159 } while (curItr != indexList.end() && curItr->getIndex() <= index);
161 LLVM_DEBUG(dbgs() << "\n*** Renumbered SlotIndexes " << startItr->getIndex()
201 assert(ListI->getIndex() >= startIdx.getIndex() &&
205 MachineInstr *SlotMI = ListI->getInstr();
241 dbgs() << itr->getIndex() << " ";
243 if (itr->getInstr()) {
244 dbgs() << *itr->getInstr();
lib/CodeGen/VirtRegMap.cpp 413 I != E && I->isBundledWithSucc(); ++I) {
414 if (!I->isCopy())
501 LLVM_DEBUG(MBBI->print(dbgs(), Indexes));
503 MII = MBBI->instr_begin(), MIE = MBBI->instr_end(); MII != MIE;) {
503 MII = MBBI->instr_begin(), MIE = MBBI->instr_end(); MII != MIE;) {
lib/IR/BasicBlock.cpp 229 if (InsertPt->isEHPad()) ++InsertPt;
423 DebugLoc Loc = I->getDebugLoc();
lib/IR/Function.cpp 368 BasicBlocks.begin()->eraseFromParent();
lib/IR/Instruction.cpp 96 assert(I == BB.end() || I->getParent() == &BB);
lib/IR/SymbolTableListTraitsImpl.h 49 if (I->hasName())
50 OldST->removeValueName(I->getValueName());
56 if (I->hasName())
107 first->setParent(NewIP);
lib/IR/Value.cpp 150 if (is_contained(BI->operands(), this))
lib/MC/MCAssembler.cpp 1068 switch(I->getKind()) {
lib/MC/MCSection.cpp 98 it->dump();
lib/Target/AArch64/AArch64SpeculationHardening.cpp 266 DL = (--MBB.instr_end())->getDebugLoc();
lib/Target/AArch64/AArch64StackTagging.cpp 341 for (; Count < ClScanLimit && !BI->isTerminator(); ++BI) {
352 if (BI->mayWriteToMemory() || BI->mayReadFromMemory())
352 if (BI->mayWriteToMemory() || BI->mayReadFromMemory())
lib/Target/AMDGPU/AMDGPUMCInstLower.cpp 274 while (I != MBB->instr_end() && I->isInsideBundle()) {
398 while (I != MBB->instr_end() && I->isInsideBundle()) {
lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp 1917 CodeBB->getParent()->begin()->getNumber());
lib/Target/AMDGPU/GCNHazardRecognizer.cpp 209 for (; MI != E && MI->isInsideBundle(); ++MI) {
369 if (I->isBundle())
375 if (I->isInlineAsm() || I->isImplicitDef() || I->isDebugInstr())
375 if (I->isInlineAsm() || I->isImplicitDef() || I->isDebugInstr())
375 if (I->isInlineAsm() || I->isImplicitDef() || I->isDebugInstr())
lib/Target/AMDGPU/GCNILPSched.cpp 246 auto NewBestSU = pickBest(Best->SU, I->SU);
246 auto NewBestSU = pickBest(Best->SU, I->SU);
247 if (NewBestSU != Best->SU) {
248 assert(NewBestSU == I->SU);
321 })->SU;
lib/Target/AMDGPU/GCNRegBankReassign.cpp 412 if (Def->getOpcode() == TargetOpcode::IMPLICIT_DEF)
414 if (Def->modifiesRegister(Reg1, TRI))
416 if (Def->modifiesRegister(Reg2, TRI))
lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp 426 while (++BI != E && BI->isBundledWithPred()) {
427 BI->unbundleFromPred();
428 for (MachineOperand &MO : BI->operands()) {
lib/Target/AMDGPU/R600Packetizer.cpp 86 int OperandIdx = TII->getOperandIdx(BI->getOpcode(), R600::OpName::write);
87 if (OperandIdx > -1 && BI->getOperand(OperandIdx).getImm() == 0)
89 int DstIdx = TII->getOperandIdx(BI->getOpcode(), R600::OpName::dst);
93 Register Dst = BI->getOperand(DstIdx).getReg();
98 if (BI->getOpcode() == R600::DOT4_r600 ||
99 BI->getOpcode() == R600::DOT4_eg) {
124 } while ((++BI)->isBundledWithPred());
353 MachineBasicBlock::iterator End = MBB->end();
354 MachineBasicBlock::iterator MI = MBB->begin();
360 MBB->erase(DeleteMI);
361 End = MBB->end();
372 unsigned RemainingCount = MBB->size();
373 for(MachineBasicBlock::iterator RegionEnd = MBB->end();
374 RegionEnd != MBB->begin();) {
378 for(;I != MBB->begin(); --I, --RemainingCount) {
382 I = MBB->begin();
lib/Target/AMDGPU/SIFixSGPRCopies.cpp 572 if (R->readsRegister(Reg, TRI) || R->definesRegister(Reg, TRI) ||
572 if (R->readsRegister(Reg, TRI) || R->definesRegister(Reg, TRI) ||
lib/Target/AMDGPU/SIFormMemoryClauses.cpp 366 BI->bundleWithPred();
369 for (MachineOperand &MO : BI->defs())
lib/Target/AMDGPU/SIInsertWaitcnts.cpp 1068 if (II->isDebugInstr())
1073 II->eraseFromParent();
1075 } else if (II->getOpcode() == AMDGPU::S_WAITCNT) {
1076 int64_t Imm = II->getOperand(0).getImm();
1079 assert(II->getOpcode() == AMDGPU::S_WAITCNT_VSCNT);
1080 assert(II->getOperand(0).getReg() == AMDGPU::SGPR_NULL);
1082 AMDGPU::Waitcnt(0, 0, 0, II->getOperand(1).getImm()));
1109 if (II->isDebugInstr())
1112 if (II->getOpcode() == AMDGPU::S_WAITCNT) {
1113 unsigned IEnc = II->getOperand(0).getImm();
1120 II->getOperand(0).setImm(NewEnc);
1127 assert(II->getOpcode() == AMDGPU::S_WAITCNT_VSCNT);
1128 assert(II->getOperand(0).getReg() == AMDGPU::SGPR_NULL);
1130 unsigned ICnt = II->getOperand(1).getImm();
1135 II->getOperand(1).setImm(Wait.VsCnt);
lib/Target/AMDGPU/SIInstrInfo.cpp 1549 I->isBundledWithSucc(); ++I) {
1550 I->unbundleFromSucc();
1551 for (MachineOperand &MO : I->operands())
2657 !RI.isSGPRReg(MBB->getParent()->getRegInfo(), Src0->getReg()))) {
5972 while (++I != E && I->isInsideBundle()) {
5973 assert(!I->isBundle() && "No nested bundle!");
6471 if (I->isDebugInstr())
6477 if (I->modifiesRegister(AMDGPU::EXEC, TRI))
6510 if (I->isDebugInstr())
6516 if (I->readsRegister(VReg))
6520 if (I->modifiesRegister(AMDGPU::EXEC, TRI))
lib/Target/AMDGPU/SILowerControlFlow.cpp 458 if (I->modifiesRegister(AMDGPU::EXEC, TRI) &&
459 !(I->isCopy() && I->getOperand(0).getReg() != Exec))
459 !(I->isCopy() && I->getOperand(0).getReg() != Exec))
lib/Target/AMDGPU/SIPeepholeSDWA.cpp 919 if (I->modifiesRegister(AMDGPU::VCC, TRI))
lib/Target/AMDGPU/SIShrinkInstructions.cpp 509 (I->getOpcode() != AMDGPU::V_MOV_B32_e32 &&
510 I->getOpcode() != AMDGPU::COPY) ||
511 I->getOperand(0).getReg() != X ||
512 I->getOperand(0).getSubReg() != Xsub) {
lib/Target/ARM/ARMBaseInstrInfo.cpp 305 MFI->insert(MBBI, NewMIs[1]);
306 MFI->insert(MBBI, NewMIs[0]);
486 while (++I != E && I->isInsideBundle()) {
487 int PIdx = I->findFirstPredOperandIdx();
488 if (PIdx != -1 && I->getOperand(PIdx).getImm() != ARMCC::AL)
761 while (++I != E && I->isInsideBundle()) {
762 assert(!I->isBundle() && "No nested bundle!");
1726 switch (I->getOpcode()) {
1730 unsigned CPI = I->getOperand(1).getIndex();
1732 I->getOperand(1).setIndex(CPI);
1733 I->getOperand(2).setImm(PCLabelId);
1737 if (!I->isBundledWithSucc())
4027 assert(II->isInsideBundle() && "Empty bundle?");
4030 while (II->isInsideBundle()) {
4031 Idx = II->findRegisterDefOperandIdx(Reg, false, true, TRI);
4049 assert(II->isInsideBundle() && "Empty bundle?");
4054 while (II != E && II->isInsideBundle()) {
4055 Idx = II->findRegisterUseOperandIdx(Reg, false, TRI);
4058 if (II->getOpcode() != ARM::t2IT)
4638 while (++I != E && I->isInsideBundle()) {
4639 if (I->getOpcode() != ARM::t2IT)
lib/Target/ARM/ARMConstantIslandPass.cpp 1032 NextBlockOffset = BBInfo[NextBlock->getNumber()].Offset;
1033 NextBlockAlignment = NextBlock->getAlignment();
1705 std::next(MBB->getIterator())->removeSuccessor(DestBB);
2111 MachineFunction *MF = MBB->getParent();
2114 return MBB != MF->end() && MBB->begin() != MBB->end() &&
2114 return MBB != MF->end() && MBB->begin() != MBB->end() &&
2115 &*MBB->begin() == CPEMI;
2415 OldPrior->updateTerminator();
lib/Target/ARM/ARMISelLowering.cpp 9482 if (!BB->isEHPad()) continue;
9487 II = BB->begin(), IE = BB->end(); II != IE; ++II) {
9487 II = BB->begin(), IE = BB->end(); II != IE; ++II) {
lib/Target/ARM/MVEVPTBlockPass.cpp 206 LLVM_DEBUG(dbgs() << " adding : "; MBIter->dump());
lib/Target/ARM/Thumb2SizeReduction.cpp 1071 bool NextInSameBundle = NextMII != E && NextMII->isBundledWithPred();
1079 if (NextInSameBundle && !NextMII->isBundledWithPred())
1080 NextMII->bundleWithPred();
lib/Target/AVR/AVRFrameLowering.cpp 121 I->addLiveIn(AVR::R29R28);
lib/Target/Hexagon/BitTracker.cpp 1091 int NextN = Next->getNumber();
lib/Target/Hexagon/HexagonAsmPrinter.cpp 753 for (++MII; MII != MBB->instr_end() && MII->isInsideBundle(); ++MII)
754 if (!MII->isDebugInstr() && !MII->isImplicitDef())
754 if (!MII->isDebugInstr() && !MII->isImplicitDef())
lib/Target/Hexagon/HexagonBranchRelaxation.cpp 170 TBB = FirstTerm->getOperand(HII->getCExtOpNum(*FirstTerm)).getMBB();
181 (SecondTerm->isBranch() || SecondTerm->isCall()) &&
181 (SecondTerm->isBranch() || SecondTerm->isCall()) &&
lib/Target/Hexagon/HexagonCommonGEP.cpp 1277 for (BasicBlock::iterator I = A->begin(), E = A->end(); I != E; ++I)
1277 for (BasicBlock::iterator I = A->begin(), E = A->end(); I != E; ++I)
lib/Target/Hexagon/HexagonCopyToCombine.cpp 487 for(MachineBasicBlock::iterator MI = BI->begin(), End = BI->end();
487 for(MachineBasicBlock::iterator MI = BI->begin(), End = BI->end();
lib/Target/Hexagon/HexagonFrameLowering.cpp 859 while (++T != End && T->isBundled()) {
860 if (T->getOpcode() == Hexagon::S2_allocframe)
862 else if (T->isCall())
lib/Target/Hexagon/HexagonHardwareLoops.cpp 428 I != E && I->isPHI(); ++I) {
1629 I != E && I->isPHI(); ++I) {
1899 I != E && I->isPHI(); ++I) {
1947 I != E && I->isPHI(); ++I) {
lib/Target/Hexagon/HexagonInstrInfo.cpp 136 if (!MIB->isDebugInstr())
167 unsigned Opc = I->getOpcode();
172 if (Opc == EndLoopOp && I->getOperand(0).getMBB() != TargetBB)
343 for (++MII; MII != MBB->instr_end() && MII->isInsideBundle(); ++MII)
361 for (++MII; MII != MBB->instr_end() && MII->isInsideBundle(); ++MII)
413 if (I->isEHLabel())
421 while (I->isDebugInstr()) {
427 bool JumpToBlock = I->getOpcode() == Hexagon::J2_jump &&
428 I->getOperand(0).isMBB();
431 MBB.isLayoutSuccessor(I->getOperand(0).getMBB())) {
433 I->eraseFromParent();
447 if (&*I != LastInst && !I->isBundle() && isUnpredicatedTerminator(*I)) {
537 I->eraseFromParent();
3082 MachineBasicBlock::const_instr_iterator MIE = MII->getParent()->instr_end();
3084 if (!MII->isBundle())
3087 for (++MII; MII != MIE && MII->isInsideBundle(); ++MII) {
3248 if (I->isEHLabel())
3255 while (I->isDebugInstr()) {
3269 if (&*I != LastInst && !I->isBundle() && isUnpredicatedTerminator(*I)) {
3629 assert(NextIt->isUnconditionalBranch());
3632 for (const MachineOperand &Op : NextIt->operands()) {
4433 assert(MIB->isBundle());
4434 MachineOperand &Operand = MIB->getOperand(0);
4438 MIB->addOperand(MachineOperand::CreateImm(memShufDisabledMask));
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp 1405 for (auto &J : I->operands()) {
1439 I->replaceUsesOfWith(Op, W);
1525 Module *M = At->getParent()->getParent()->getParent();
lib/Target/Hexagon/HexagonNewValueJump.cpp 658 for (MachineOperand &Op : I->operands()) {
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp 187 for (++I; I != E && I->isBundledWithPred(); ++I)
lib/Target/Hexagon/HexagonVectorPrint.cpp 140 for (++MII; MII != MBB.instr_end() && MII->isInsideBundle(); ++MII) {
141 if (MII->getNumOperands() < 1)
147 MII->dump());
173 while (MBB->instr_end() != MII && MII->isInsideBundle())
lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp 719 switch (K->getKind()) {
lib/Target/Lanai/LanaiAsmPrinter.cpp 202 if (I->isCall()) {
208 } while ((++I != E) && I->isInsideBundle());
lib/Target/Lanai/LanaiDelaySlotFiller.cpp 97 if (I->getDesc().hasDelaySlot()) {
103 if (I->getOpcode() == Lanai::RET) {
108 assert(RI->getOpcode() == Lanai::LDW_RI && RI->getOperand(0).isReg() &&
108 assert(RI->getOpcode() == Lanai::LDW_RI && RI->getOperand(0).isReg() &&
109 RI->getOperand(0).getReg() == Lanai::FP &&
110 RI->getOperand(1).isReg() &&
111 RI->getOperand(1).getReg() == Lanai::FP &&
112 RI->getOperand(2).isImm() && RI->getOperand(2).getImm() == -8);
112 RI->getOperand(2).isImm() && RI->getOperand(2).getImm() == -8);
114 assert(RI->getOpcode() == Lanai::ADD_I_LO &&
115 RI->getOperand(0).isReg() &&
116 RI->getOperand(0).getReg() == Lanai::SP &&
117 RI->getOperand(1).isReg() &&
118 RI->getOperand(1).getReg() == Lanai::FP);
158 if (I->isDebugInstr())
164 if (I->hasUnmodeledSideEffects() || I->isInlineAsm() || I->isLabel() ||
164 if (I->hasUnmodeledSideEffects() || I->isInlineAsm() || I->isLabel() ||
164 if (I->hasUnmodeledSideEffects() || I->isInlineAsm() || I->isLabel() ||
165 FI == LastFiller || I->isPseudo())
181 if (MI->isImplicitDef() || MI->isKill())
181 if (MI->isImplicitDef() || MI->isKill())
186 if (MI->mayLoad()) {
192 if (MI->mayStore()) {
200 assert((!MI->isCall() && !MI->isReturn()) &&
200 assert((!MI->isCall() && !MI->isReturn()) &&
203 for (unsigned I = 0, E = MI->getNumOperands(); I != E; ++I) {
204 const MachineOperand &MO = MI->getOperand(I);
229 MCInstrDesc MCID = MI->getDesc();
230 unsigned E = MI->isCall() || MI->isReturn() ? MCID.getNumOperands()
230 unsigned E = MI->isCall() || MI->isReturn() ? MCID.getNumOperands()
231 : MI->getNumOperands();
233 const MachineOperand &MO = MI->getOperand(I);
250 if (MI->isCall() || MI->isReturn())
250 if (MI->isCall() || MI->isReturn())
lib/Target/Lanai/LanaiFrameLowering.cpp 70 MachineBasicBlock::iterator MBBI = MBB->begin();
71 while (MBBI != MBB->end()) {
lib/Target/MSP430/MSP430BranchSelector.cpp 95 unsigned TotalSize = BlockOffsets[Begin->getNumber()];
120 for (auto MI = MBB->begin(), EE = MBB->end(); MI != EE; ++MI) {
120 for (auto MI = MBB->begin(), EE = MBB->end(); MI != EE; ++MI) {
133 BlockOffsets[DestBB->getNumber()] - BlockOffsets[MBB->getNumber()];
153 MF->CreateMachineBasicBlock(MBB->getBasicBlock());
157 NewBB->splice(NewBB->end(), &*MBB, std::next(MI), MBB->end());
160 for (MachineBasicBlock *Succ : MBB->successors()) {
164 MBB->replaceSuccessor(Succ, NewBB);
185 assert(MBB->isSuccessor(NextMBB) &&
212 for (int i = MBB->getNumber() + 1, e = BlockOffsets.size(); i < e; ++i) {
lib/Target/MSP430/MSP430FrameLowering.cpp 76 I->addLiveIn(MSP430::FP);
lib/Target/Mips/Mips16HardFloat.cpp 517 if (F->hasFnAttribute("nomips16") &&
518 F->hasFnAttribute("use-soft-float")) {
522 if (F->isDeclaration() || F->hasFnAttribute("mips16_fp_stub") ||
522 if (F->isDeclaration() || F->hasFnAttribute("mips16_fp_stub") ||
523 F->hasFnAttribute("nomips16")) continue;
lib/Target/Mips/MipsAsmPrinter.cpp 260 if (I->getOpcode() == Mips::PseudoReturn ||
261 I->getOpcode() == Mips::PseudoReturn64 ||
262 I->getOpcode() == Mips::PseudoIndirectBranch ||
263 I->getOpcode() == Mips::PseudoIndirectBranch64 ||
264 I->getOpcode() == Mips::TAILCALLREG ||
265 I->getOpcode() == Mips::TAILCALLREG64) {
277 if (I->isPseudo() && !Subtarget->inMips16Mode()
278 && !isLongBranchPseudo(I->getOpcode()))
284 } while ((++I != E) && I->isInsideBundle()); // Delay slot check
lib/Target/Mips/MipsBranchExpansion.cpp 360 MIBundleBuilder(&*MIB).append((++II)->removeFromBundle());
740 for (Iter I = FI->begin(); I != FI->end(); ++I) {
740 for (Iter I = FI->begin(); I != FI->end(); ++I) {
748 std::next(I) == FI->end() && std::next(FI) == MFp->end();
758 if (std::next(Iit) == FI->end() ||
759 std::next(Iit)->getOpcode() != Mips::NOP) {
lib/Target/Mips/MipsConstantIslandPass.cpp 945 NextBlockOffset = BBInfo[NextBlock->getNumber()].Offset;
946 NextBlockAlignment = NextBlock->getAlignment();
1645 B->instr_begin(), EB = B->instr_end(); I != EB; ++I) {
1645 B->instr_begin(), EB = B->instr_end(); I != EB; ++I) {
1646 switch(I->getDesc().getOpcode()) {
1650 J = I->getNumOperands();
1652 MachineOperand& Literal = I->getOperand(1);
1660 I->getOperand(2).ChangeToImmediate(index);
1662 I->setDesc(TII->get(Mips::LwRxPcTcp16));
1663 I->RemoveOperand(1);
1664 I->RemoveOperand(1);
1665 I->addOperand(MachineOperand::CreateCPI(index, 0));
1666 I->addOperand(MachineOperand::CreateImm(4));
lib/Target/Mips/MipsDelaySlotFiller.cpp 631 DSI->isCall()) {
640 DSI->setDesc(TII->get(getEquivalentCallShort(DSI->getOpcode())));
640 DSI->setDesc(TII->get(getEquivalentCallShort(DSI->getOpcode())));
lib/Target/Mips/MipsOs16.cpp 77 for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
77 for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
lib/Target/NVPTX/NVPTXAllocaHoisting.cpp 43 Instruction *firstTerminatorInst = (I++)->getTerminator();
46 for (BasicBlock::iterator BI = I->begin(), BE = I->end(); BI != BE;) {
46 for (BasicBlock::iterator BI = I->begin(), BE = I->end(); BI != BE;) {
lib/Target/NVPTX/NVPTXGenericToNVVM.cpp 103 if (I->isDeclaration()) {
106 IRBuilder<> Builder(I->getEntryBlock().getFirstNonPHIOrDbg());
107 for (Function::iterator BBI = I->begin(), BBE = I->end(); BBI != BBE;
107 for (Function::iterator BBI = I->begin(), BBE = I->end(); BBI != BBE;
109 for (BasicBlock::iterator II = BBI->begin(), IE = BBI->end(); II != IE;
109 for (BasicBlock::iterator II = BBI->begin(), IE = BBI->end(); II != IE;
111 for (unsigned i = 0, e = II->getNumOperands(); i < e; ++i) {
112 Value *Operand = II->getOperand(i);
114 II->setOperand(
lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp 70 for (BasicBlock::iterator II = BI->begin(), IE = BI->end(); II != IE;
70 for (BasicBlock::iterator II = BI->begin(), IE = BI->end(); II != IE;
lib/Target/NVPTX/NVPTXLowerArgs.cpp 190 assert(InsertPt != InsertPt->getParent()->end() &&
lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp 92 if (I->isReturnBlock())
lib/Target/PowerPC/PPCFrameLowering.cpp 308 if (I->isReturnBlock()) {
310 for (MBBI = I->end(); MBBI != I->begin(); ) {
310 for (MBBI = I->end(); MBBI != I->begin(); ) {
570 for (MachineBasicBlock::iterator MBBI = BI->end(); MBBI != BI->begin(); ) {
570 for (MachineBasicBlock::iterator MBBI = BI->end(); MBBI != BI->begin(); ) {
lib/Target/PowerPC/PPCISelDAGToDAG.cpp 412 if (BB->isReturnBlock()) {
413 IP = BB->end(); --IP;
418 while (I2 != BB->begin() && (--I2)->isTerminator())
lib/Target/PowerPC/PPCInstrInfo.cpp 4033 (--II)->getOpcode() == PPC::ADJCALLSTACKUP) {
lib/Target/PowerPC/PPCPreEmitPeephole.cpp 83 unsigned Opc = BBI->getOpcode();
89 if (!BBI->getOperand(1).isImm())
91 assert(BBI->getOperand(0).isReg() &&
94 LLVM_DEBUG(dbgs() << "Scanning after load immediate: "; BBI->dump(););
96 Register Reg = BBI->getOperand(0).getReg();
97 int64_t Imm = BBI->getOperand(1).getImm();
99 if (BBI->getOperand(0).isDead()) {
100 DeadOrKillToUnset = &BBI->getOperand(0);
111 int KillIdx = AfterBBI->findRegisterUseOperandIdx(Reg, true, TRI);
114 DeadOrKillToUnset = &AfterBBI->getOperand(KillIdx);
120 if (!AfterBBI->modifiesRegister(Reg, TRI))
124 if (AfterBBI->getOpcode() != Opc)
126 assert(AfterBBI->getOperand(0).isReg() &&
130 if (!AfterBBI->getOperand(1).isImm() ||
131 AfterBBI->getOperand(1).getImm() != Imm)
147 AfterBBI->findRegisterDefOperand(Reg, true, true, TRI);
154 AfterBBI->dump());
lib/Target/PowerPC/PPCTargetTransformInfo.cpp 433 J->getType()->getScalarType()->isPPC_FP128Ty()) {
445 J->getType()->getScalarType()) &&
446 (J->getOpcode() == Instruction::UDiv ||
447 J->getOpcode() == Instruction::SDiv ||
448 J->getOpcode() == Instruction::URem ||
449 J->getOpcode() == Instruction::SRem)) {
452 isLargeIntegerTy(false, J->getType()->getScalarType()) &&
453 (J->getOpcode() == Instruction::Shl ||
454 J->getOpcode() == Instruction::AShr ||
455 J->getOpcode() == Instruction::LShr)) {
468 if (J->getOpcode() == Instruction::FRem)
472 switch(J->getOpcode()) {
488 for (Value *Operand : J->operands())
lib/Target/RISCV/RISCVISelLowering.cpp 1334 BuildMI(*TailMBB, InsertionPoint, SelectMBBI->getDebugLoc(),
1335 TII.get(RISCV::PHI), SelectMBBI->getOperand(0).getReg())
1336 .addReg(SelectMBBI->getOperand(4).getReg())
1338 .addReg(SelectMBBI->getOperand(5).getReg())
1340 SelectMBBI->eraseFromParent();
lib/Target/Sparc/SparcAsmPrinter.cpp 270 } while ((++I != E) && I->isInsideBundle()); // Delay slot check.
lib/Target/Sparc/SparcFrameLowering.cpp 356 if (!MBB->isLiveIn(reg))
358 MBB->removeLiveIn(reg);
359 MBB->addLiveIn(reg - SP::I0_I1 + SP::O0_O1);
362 if (!MBB->isLiveIn(reg))
364 MBB->removeLiveIn(reg);
365 MBB->addLiveIn(reg - SP::I0 + SP::O0);
lib/Target/SystemZ/SystemZFrameLowering.cpp 432 I->addLiveIn(SystemZ::R11D);
lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp 248 if (MachineBasicBlock *ScopeTop = ScopeTops[I->getNumber()]) {
479 if (MachineBasicBlock *ScopeTop = ScopeTops[I->getNumber()]) {
547 std::prev(MI.getIterator())->isEHLabel()) {
692 std::prev(B)->getOpcode() == WebAssembly::BLOCK &&
693 E->getOpcode() == WebAssembly::END_BLOCK &&
694 std::prev(B)->getOperand(0).getImm() == RetType;
1115 std::prev(RangeBegin->getIterator())->isEHLabel())
1118 std::next(RangeEnd->getIterator())->isEHLabel())
lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp 204 for (MachineBasicBlock::iterator I = MF.begin()->begin(),
205 E = MF.begin()->end();
lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp 166 if (I->isDebugInstr())
168 if (!I->isTerminator())
171 I->eraseFromParent();
lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp 96 for (auto MII = MF.begin()->begin(), MIE = MF.begin()->end(); MII != MIE;) {
96 for (auto MII = MF.begin()->begin(), MIE = MF.begin()->end(); MII != MIE;) {
lib/Target/X86/X86AvoidTrailingCall.cpp 87 if (LastRealInstr == MF.begin()->rend())
lib/Target/X86/X86CmovConversion.cpp 600 if (I->isDebugInstr())
lib/Target/X86/X86CondBrFolding.cpp 190 MI != ME && MI->isPHI(); ++MI)
191 for (unsigned i = 2, e = MI->getNumOperands() + 1; i != e; i += 2) {
192 MachineOperand &MO = MI->getOperand(i);
lib/Target/X86/X86FlagsCopyLowering.cpp 254 assert(!std::prev(PrevI.getIterator())->isTerminator() &&
lib/Target/X86/X86IndirectBranchTracking.cpp 121 Changed |= addENDBR(*MBB, MBB->begin());
lib/Target/X86/X86InsertPrefetch.cpp 195 int Offset = X86II::getMemoryOperandNo(Current->getDesc().TSFlags);
198 unsigned Bias = X86II::getOperandBias(Current->getDesc());
214 MF.CreateMachineInstr(Desc, Current->getDebugLoc(), true);
225 MIB.addReg(Current->getOperand(MemOpOffset + X86::AddrBaseReg).getReg())
227 Current->getOperand(MemOpOffset + X86::AddrScaleAmt).getImm())
229 Current->getOperand(MemOpOffset + X86::AddrIndexReg).getReg())
230 .addImm(Current->getOperand(MemOpOffset + X86::AddrDisp).getImm() +
232 .addReg(Current->getOperand(MemOpOffset + X86::AddrSegmentReg)
235 if (!Current->memoperands_empty()) {
236 MachineMemOperand *CurrentOp = *(Current->memoperands_begin());
lib/Target/X86/X86InstrInfo.cpp 764 MachineRegisterInfo &RegInfo = MFI->getParent()->getRegInfo();
1325 MFI->insert(MI.getIterator(), NewMI); // Insert the new inst
lib/Target/X86/X86SpeculativeLoadHardening.cpp 978 while (MII != MBB.instr_rend() && MII->isDebugInstr())
lib/Transforms/IPO/ArgumentPromotion.cpp 385 Instruction *InsertPt = &NF->begin()->front();
lib/Transforms/IPO/DeadArgumentElimination.cpp 519 if (const ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator())) {
530 if (BB->getTerminatingMustTailCall() != nullptr)
lib/Transforms/IPO/ExtractGV.cpp 86 deleteStuff == (bool)Named.count(&*I) && !I->isDeclaration();
88 if (I->hasAvailableExternallyLinkage())
90 if (I->getName() == "llvm.global_ctors")
98 I->setInitializer(nullptr);
99 I->setComdat(nullptr);
131 Type *Ty = CurI->getValueType();
133 CurI->removeFromParent();
137 CurI->getAddressSpace(),
138 CurI->getName(), &M);
143 nullptr, CurI->getName());
146 CurI->replaceAllUsesWith(Declaration);
lib/Transforms/IPO/MergeFunctions.cpp 533 BBI->dropAllReferences();
559 LLVM_DEBUG(BI->print(dbgs()));
564 LLVM_DEBUG(BI->print(dbgs()));
569 LLVM_DEBUG(BI->print(dbgs()));
574 LLVM_DEBUG(BI->print(dbgs()));
597 LLVM_DEBUG(BI->print(dbgs()));
614 LLVM_DEBUG(BI->print(dbgs()));
619 LLVM_DEBUG(BI->print(dbgs()));
622 } else if (BI->isTerminator() && &*BI == GEntryBlock->getTerminator()) {
624 LLVM_DEBUG(BI->print(dbgs()));
629 LLVM_DEBUG(BI->print(dbgs()));
lib/Transforms/IPO/PruneEH.cpp 191 if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()))
204 for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; )
204 for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; )
212 BasicBlock *New = BB->splitBasicBlock(I);
215 BB->getInstList().pop_back();
216 new UnreachableInst(BB->getContext(), &*BB);
240 if (I->getType()->isTokenTy()) {
253 if (!I->use_empty())
254 I->replaceAllUsesWith(UndefValue::get(I->getType()));
254 I->replaceAllUsesWith(UndefValue::get(I->getType()));
lib/Transforms/IPO/StripSymbols.cpp 212 if (I->hasLocalLinkage() && llvmUsedValues.count(&*I) == 0)
213 if (!PreserveDbgInfo || !I->getName().startswith("llvm.dbg"))
214 I->setName(""); // Internal symbols can't participate in linkage
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp 1416 (isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy())) {
1448 if (BBI->mayWriteToMemory() || BBI->mayReadFromMemory() || BBI->mayThrow())
1448 if (BBI->mayWriteToMemory() || BBI->mayReadFromMemory() || BBI->mayThrow())
1448 if (BBI->mayWriteToMemory() || BBI->mayReadFromMemory() || BBI->mayThrow())
1474 (isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy()));
1522 (isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy())) {
1553 if (BBI->mayReadFromMemory() || BBI->mayThrow() ||
1553 if (BBI->mayReadFromMemory() || BBI->mayThrow() ||
1554 BBI->mayWriteToMemory() || BBI == OtherBB->begin())
1562 if (I->mayReadFromMemory() || I->mayThrow() || I->mayWriteToMemory())
1562 if (I->mayReadFromMemory() || I->mayThrow() || I->mayWriteToMemory())
1562 if (I->mayReadFromMemory() || I->mayThrow() || I->mayWriteToMemory())
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp 620 for (Instruction::op_iterator I = BBI->op_begin(), E = BBI->op_end();
620 for (Instruction::op_iterator I = BBI->op_begin(), E = BBI->op_end();
lib/Transforms/InstCombine/InstCombinePHI.cpp 497 if (BBI->mayWriteToMemory())
lib/Transforms/InstCombine/InstructionCombining.cpp 3149 if (Scan->mayWriteToMemory())
lib/Transforms/Instrumentation/BoundsChecking.cpp 126 BasicBlock *OldBB = SplitI->getParent();
lib/Transforms/Instrumentation/CFGMST.h 121 Instruction *TI = BB->getTerminator();
140 LLVM_DEBUG(dbgs() << " Edge: from " << BB->getName() << " to "
166 LLVM_DEBUG(dbgs() << " Edge: from " << BB->getName() << " to fake exit"
lib/Transforms/Instrumentation/Instrumentation.cpp 31 I->moveBefore(&*IP);
lib/Transforms/Instrumentation/SanitizerCoverage.cpp 861 EntryLoc = IP->getDebugLoc();
lib/Transforms/Scalar/ConstantHoisting.cpp 327 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
lib/Transforms/Scalar/DeadStoreElimination.cpp 882 } else if (!BBI->mayReadFromMemory()) {
lib/Transforms/Scalar/GVNSink.cpp 540 I != E && !I->isTerminator(); ++I) {
lib/Transforms/Scalar/IndVarSimplify.cpp 2588 if (I->mayHaveSideEffects() || I->mayReadFromMemory())
2588 if (I->mayHaveSideEffects() || I->mayReadFromMemory())
2596 if (I->isEHPad())
2609 for (Use &U : I->uses()) {
lib/Transforms/Scalar/JumpThreading.cpp 516 if (isa<BitCastInst>(I) && I->getType()->isPointerTy())
521 if (I->getType()->isTokenTy() && I->isUsedOutsideOfBlock(BB))
521 if (I->getType()->isTokenTy() && I->isUsedOutsideOfBlock(BB))
2009 for (; !BI->isTerminator(); ++BI) {
2010 Instruction *New = BI->clone();
2011 New->setName(BI->getName());
2326 Instruction *New = BI->clone();
2352 New->setName(BI->getName());
lib/Transforms/Scalar/LICM.cpp 1191 auto *UniqueI = Begin->getUniqueInstruction();
lib/Transforms/Scalar/LoopRerollPass.cpp 579 if (!I->getType()->isIntegerTy() && !I->getType()->isPointerTy())
579 if (!I->getType()->isIntegerTy() && !I->getType()->isPointerTy())
658 if (!I->getType()->isSingleValueType())
1440 J++->eraseFromParent();
lib/Transforms/Scalar/LoopStrengthReduce.cpp 2079 Instruction *ShadowUse = CandidateUI->getUser();
2095 if (UIToFPInst *UCast = dyn_cast<UIToFPInst>(CandidateUI->getUser())) {
2099 else if (SIToFPInst *SCast = dyn_cast<SIToFPInst>(CandidateUI->getUser())) {
2425 !DT.properlyDominates(UI->getUser()->getParent(), ExitingBlock)) {
2450 if (isAddressUse(TTI, UI->getUser(), UI->getOperandValToReplace())) {
2450 if (isAddressUse(TTI, UI->getUser(), UI->getOperandValToReplace())) {
2452 TTI, UI->getUser(), UI->getOperandValToReplace());
2452 TTI, UI->getUser(), UI->getOperandValToReplace());
5036 const Loop *IPLoop = LI.getLoopFor(IP->getParent());
5040 for (DomTreeNode *Rung = DT.getNode(IP->getParent()); ; ) {
5099 assert(!isa<PHINode>(LowestIP) && !LowestIP->isEHPad()
5111 while (IP->isEHPad()) ++IP;
lib/Transforms/Scalar/MemCpyOptimizer.cpp 316 for (++BI; !BI->isTerminator(); ++BI) {
321 if (BI->mayWriteToMemory() || BI->mayReadFromMemory())
321 if (BI->mayWriteToMemory() || BI->mayReadFromMemory())
640 if (I->mayThrow() && !CpyDestIsLocal) {
lib/Transforms/Scalar/MergeICmps.cpp 883 if (auto *const Phi = dyn_cast<PHINode>(&*BBIt->begin()))
lib/Transforms/Scalar/NaryReassociate.cpp 236 if (SE->isSCEVable(I->getType()) && isPotentiallyNaryReassociable(&*I)) {
241 I->replaceAllUsesWith(NewI);
lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp 97 for (BasicBlock::iterator II = CurrBB->begin(), IE = CurrBB->end();
97 for (BasicBlock::iterator II = CurrBB->begin(), IE = CurrBB->end();
lib/Transforms/Scalar/PlaceSafepoints.cpp 281 if (BBI->isTerminator()) {
282 BasicBlock *BB = BBI->getParent();
lib/Transforms/Scalar/Reassociate.cpp 880 const BasicBlock *BB = InsertPt->getParent();
885 InsertPt->isEHPad())) {
2417 assert(II->getParent() == &*BI && "Moved to a different block!");
lib/Transforms/Scalar/Reg2Mem.cpp 95 if (!(isa<AllocaInst>(iib) && iib->getParent() == BBEntry) &&
lib/Transforms/Scalar/SCCP.cpp 2094 for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) {
2094 for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) {
lib/Transforms/Scalar/SROA.cpp 1220 if (BBI->mayWriteToMemory())
lib/Transforms/Scalar/SpeculativeExecution.cpp 290 Current->moveBefore(ToBlock.getTerminator());
lib/Transforms/Utils/BasicBlockUtils.cpp 343 I->setDebugLoc(BI->getDebugLoc());
406 while (isa<PHINode>(SplitIt) || SplitIt->isEHPad())
647 cast<PHINode>(I)->addIncoming(UndefValue::get(I->getType()), NewBB);
lib/Transforms/Utils/CloneFunction.cpp 336 Instruction *NewInst = II->clone();
363 if (II->hasName())
364 NewInst->setName(II->getName()+NameSuffix);
674 I->getSinglePredecessor() == &*I)) {
680 BranchInst *BI = dyn_cast<BranchInst>(I->getTerminator());
700 I->getInstList().splice(I->end(), Dest->getInstList());
700 I->getInstList().splice(I->end(), Dest->getInstList());
714 if (ReturnInst *RI = dyn_cast<ReturnInst>(I->getTerminator()))
863 Instruction *New = BI->clone();
864 New->setName(BI->getName());
lib/Transforms/Utils/CloneModule.cpp 64 I->getValueType(),
65 I->isConstant(), I->getLinkage(),
65 I->isConstant(), I->getLinkage(),
66 (Constant*) nullptr, I->getName(),
68 I->getThreadLocalMode(),
69 I->getType()->getAddressSpace());
92 if (I->getValueType()->isFunctionTy())
93 GV = Function::Create(cast<FunctionType>(I->getValueType()),
95 I->getAddressSpace(), I->getName(), New.get());
95 I->getAddressSpace(), I->getName(), New.get());
98 *New, I->getValueType(), false, GlobalValue::ExternalLinkage,
99 nullptr, I->getName(), nullptr,
100 I->getThreadLocalMode(), I->getType()->getAddressSpace());
100 I->getThreadLocalMode(), I->getType()->getAddressSpace());
107 auto *GA = GlobalAlias::create(I->getValueType(),
108 I->getType()->getPointerAddressSpace(),
109 I->getLinkage(), I->getName(), New.get());
109 I->getLinkage(), I->getName(), New.get());
120 if (I->isDeclaration())
129 if (I->hasInitializer())
130 GV->setInitializer(MapValue(I->getInitializer(), VMap));
133 I->getAllMetadata(MDs);
179 if (const Constant *C = I->getAliasee())
lib/Transforms/Utils/CodeExtractor.cpp 936 Instruction *TI = newFunction->begin()->getTerminator();
lib/Transforms/Utils/DemoteRegToStack.cpp 96 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
143 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
lib/Transforms/Utils/EntryExitInstrumenter.cpp 86 insertCall(F, EntryFunc, &*F.begin()->getFirstInsertionPt(), DL);
lib/Transforms/Utils/Evaluator.cpp 607 } else if (CurInst->isTerminator()) {
650 if (!CurInst->use_empty()) {
lib/Transforms/Utils/FlattenCFG.cpp 351 if (!iter1->isIdenticalTo(&*iter2))
356 if (iter1->mayHaveSideEffects()) {
365 if (iter1->mayReadFromMemory())
368 if (iter1->mayWriteToMemory()) {
370 if (BI->mayReadFromMemory() || BI->mayWriteToMemory()) {
370 if (BI->mayReadFromMemory() || BI->mayWriteToMemory()) {
lib/Transforms/Utils/FunctionComparator.cpp 772 assert(InstL->getNumOperands() == InstR->getNumOperands());
772 assert(InstL->getNumOperands() == InstR->getNumOperands());
774 for (unsigned i = 0, e = InstL->getNumOperands(); i != e; ++i) {
775 Value *OpL = InstL->getOperand(i);
776 Value *OpR = InstR->getOperand(i);
lib/Transforms/Utils/InlineFunction.cpp 599 if (InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator()))
624 if (ResumeInst *RI = dyn_cast<ResumeInst>(BB->getTerminator()))
677 if (auto *CRI = dyn_cast<CleanupReturnInst>(BB->getTerminator())) {
694 Instruction *I = BB->getFirstNonPHI();
1305 Arg->getName(), &*Caller->begin()->begin());
1409 for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
1409 for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
1413 if (MDNode *LoopID = BI->getMetadata(LLVMContext::MD_loop)) {
1415 inlineLoopID(LoopID, InlinedAtNode, BI->getContext(), IANodes);
1416 BI->setMetadata(LLVMContext::MD_loop, NewLoopID);
1419 if (DebugLoc DL = BI->getDebugLoc()) {
1421 inlineDebugLoc(DL, InlinedAtNode, BI->getContext(), IANodes);
1422 BI->setDebugLoc(IDL);
1439 BI->setDebugLoc(TheCallDL);
1810 make_range(FirstNewBlock->getIterator(), Caller->end()))
1823 BasicBlock::iterator InsertPoint = Caller->begin()->begin();
1824 for (BasicBlock::iterator I = FirstNewBlock->begin(),
1825 E = FirstNewBlock->end(); I != E; ) {
1855 InsertPoint, FirstNewBlock->getInstList(), AI->getIterator(), I);
1883 for (auto II = BB->begin(); II != BB->end();) {
1883 for (auto II = BB->begin(); II != BB->end();) {
1957 IRBuilder<> builder(&FirstNewBlock->front());
2016 CallInst *SavedPtr = IRBuilder<>(&*FirstNewBlock, FirstNewBlock->begin())
2051 for (Function::iterator BB = FirstNewBlock->getIterator(),
2056 for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E;) {
2056 for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E;) {
2093 if (auto *CleanupRet = dyn_cast<CleanupReturnInst>(BB->getTerminator()))
2097 Instruction *I = BB->getFirstNonPHI();
2215 make_range(FirstNewBlock->getIterator(), Caller->end()))
2227 FirstNewBlock->getInstList(),
2228 FirstNewBlock->begin(), FirstNewBlock->end());
2228 FirstNewBlock->begin(), FirstNewBlock->end());
lib/Transforms/Utils/Local.cpp 621 assert(!BI->isTerminator());
977 for (Use &U : BBI->uses()) {
1931 if (!BBI->use_empty())
1932 BBI->replaceAllUsesWith(UndefValue::get(BBI->getType()));
1932 BBI->replaceAllUsesWith(UndefValue::get(BBI->getType()));
lib/Transforms/Utils/LoopRotationUtils.cpp 538 switch (I->getOpcode()) {
556 !isa<Constant>(I->getOperand(0))
557 ? I->getOperand(0)
558 : !isa<Constant>(I->getOperand(1)) ? I->getOperand(1) : nullptr;
558 : !isa<Constant>(I->getOperand(1)) ? I->getOperand(1) : nullptr;
lib/Transforms/Utils/MetaRenamer.cpp 96 StringRef Name = AI->getName();
100 AI->setName("alias");
105 StringRef Name = GI->getName();
109 GI->setName("global");
lib/Transforms/Utils/PromoteMemoryToRegister.cpp 932 for (BasicBlock::iterator II = BB->begin(); !II->isTerminator();) {
lib/Transforms/Utils/SimplifyCFG.cpp 2242 Instruction *N = BBI->clone();
2243 if (BBI->hasName())
2244 N->setName(BBI->getName() + ".c");
2255 if (!BBI->use_empty())
2262 if (!BBI->use_empty())
2382 for (BasicBlock::iterator I = IfBlock1->begin(); !I->isTerminator(); ++I)
2395 for (BasicBlock::iterator I = IfBlock2->begin(); !I->isTerminator(); ++I)
2635 if (!I->hasOneUse() || !isSafeToSpeculativelyExecute(&*I))
2638 Instruction *User = dyn_cast<Instruction>(I->user_back());
2734 Instruction *NewBonusInst = BonusInst->clone();
2748 BonusInst->setName(BonusInst->getName() + ".old");
2748 BonusInst->setName(BonusInst->getName() + ".old");
2988 if (&*I != PStore && I->mayReadOrWriteMemory())
4178 if (BBI->mayHaveSideEffects()) {
4210 if (!BBI->use_empty())
4211 BBI->replaceAllUsesWith(UndefValue::get(BBI->getType()));
4211 BBI->replaceAllUsesWith(UndefValue::get(BBI->getType()));
4212 BBI->eraseFromParent();
5816 if (I->isTerminator() && BB != &BB->getParent()->getEntryBlock() &&
5826 if (I->isTerminator() &&
5836 if (I->isTerminator() && TryToMergeLandingPad(LPad, BI, BB))
5982 if (i == I->getParent()->end() || i->mayHaveSideEffects())
lib/Transforms/Vectorize/SLPVectorizer.cpp 6955 if (it->use_empty() && KeyNodes.count(&*it) > 0 &&
6989 if (it->use_empty() && (it->getType()->isVoidTy() || isa<CallInst>(it) ||
6989 if (it->use_empty() && (it->getType()->isVoidTy() || isa<CallInst>(it) ||
6994 for (auto *V : it->operand_values()) {
tools/bugpoint/CrashDebugger.cpp 776 for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI)
776 for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI)
777 for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
777 for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
1047 if (!FI->isDeclaration())
1048 for (Function::const_iterator BI = FI->begin(), E = FI->end(); BI != E;
1048 for (Function::const_iterator BI = FI->begin(), E = FI->end(); BI != E;
1050 for (BasicBlock::const_iterator I = BI->begin(), E = --BI->end();
1050 for (BasicBlock::const_iterator I = BI->begin(), E = --BI->end();
1059 if (I->isEHPad() || I->getType()->isTokenTy() ||
1059 if (I->isEHPad() || I->getType()->isTokenTy() ||
1060 I->isSwiftError())
tools/bugpoint/ExtractFunction.cpp 96 Function::iterator RBI = RFI->begin(); // Get iterator to corresponding BB
99 BasicBlock::iterator RI = RBI->begin(); // Get iterator to corresponding inst
133 I->setLinkage(GlobalValue::ExternalLinkage);
188 if (I->getAliasee()->stripPointerCasts() == GV)
311 I->setLinkage(GlobalValue::ExternalLinkage);
314 if (I->hasName() && I->getName()[0] == '\01')
314 if (I->hasName() && I->getName()[0] == '\01')
315 I->setName(I->getName().substr(1));
315 I->setName(I->getName().substr(1));
316 I->setLinkage(GlobalValue::ExternalLinkage);
tools/bugpoint/Miscompilation.cpp 294 if (!I->hasName())
295 I->setName("anon_global");
297 if (!I->hasName())
298 I->setName("anon_fn");
417 if (!I->isDeclaration())
418 MisCompFunctions.emplace_back(I->getName(), I->getFunctionType());
418 MisCompFunctions.emplace_back(I->getName(), I->getFunctionType());
588 if (!I->isDeclaration())
589 MisCompFunctions.emplace_back(I->getName(), I->getFunctionType());
589 MisCompFunctions.emplace_back(I->getName(), I->getFunctionType());
835 if (F->isDeclaration() && !F->use_empty() &&
835 if (F->isDeclaration() && !F->use_empty() &&
837 !F->isIntrinsic() /* ignore intrinsics */) {
838 Function *TestFn = Test->getFunction(F->getName());
844 ConstantDataArray::getString(F->getContext(), F->getName());
844 ConstantDataArray::getString(F->getContext(), F->getName());
847 GlobalValue::InternalLinkage, InitArray, F->getName() + "_name");
854 2, Constant::getNullValue(Type::getInt32Ty(F->getContext())));
862 if (!F->use_empty()) {
864 Constant *NullPtr = ConstantPointerNull::get(F->getType());
866 *F->getParent(), F->getType(), false,
866 *F->getParent(), F->getType(), false,
867 GlobalValue::InternalLinkage, NullPtr, F->getName() + ".fpcache");
870 FunctionType *FuncTy = F->getFunctionType();
873 F->getName() + "_wrapper", F->getParent());
873 F->getName() + "_wrapper", F->getParent());
875 BasicBlock::Create(F->getContext(), "entry", FuncWrapper);
877 BasicBlock::Create(F->getContext(), "usecache", FuncWrapper);
879 BasicBlock::Create(F->getContext(), "lookupfp", FuncWrapper);
883 new LoadInst(F->getType(), Cache, "fpcache", EntryBB);
896 Resolver, PointerType::getUnqual(F->getFunctionType()),
914 if (F->getReturnType()->isVoidTy()) {
916 ReturnInst::Create(F->getContext(), DoCallBB);
920 ReturnInst::Create(F->getContext(), Call, DoCallBB);
924 F->replaceAllUsesWith(FuncWrapper);
tools/clang/lib/CodeGen/CGException.cpp 303 if (BB->isLandingPad())
304 if (!LandingPadHasOnlyCXXUses(BB->getLandingPadInst()))
tools/clang/lib/CodeGen/CGVTables.cpp 214 ThisStore->getOperand(0)->getType());
215 ThisStore->setOperand(0, AdjustedThisPtr);
tools/clang/unittests/CodeGen/TBAAMetadataTest.cpp 81 if (!FuncPtr->isDeclaration())
87 if (!FuncPtr->isDeclaration())
tools/lldb/source/Expression/IRInterpreter.cpp 496 if (fi->begin() != fi->end()) {
496 if (fi->begin() != fi->end()) {
509 for (BasicBlock::iterator ii = bbi->begin(), ie = bbi->end(); ii != ie;
509 for (BasicBlock::iterator ii = bbi->begin(), ie = bbi->end(); ii != ie;
511 switch (ii->getOpcode()) {
597 for (int oi = 0, oe = ii->getNumOperands(); oi != oe; ++oi) {
598 Value *operand = ii->getOperand(oi);
tools/llvm-diff/DiffConsumer.cpp 31 if (!FI->hasName())
35 for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI)
35 for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI)
37 if (!BI->hasName() && !BI->getType()->isVoidTy())
37 if (!BI->hasName() && !BI->getType()->isVoidTy())
tools/llvm-diff/DifferenceEngine.cpp 519 BasicBlock::iterator LE = LStart->getParent()->end();
520 BasicBlock::iterator RE = RStart->getParent()->end();
631 Instruction *LTerm = LStart->getParent()->getTerminator();
632 Instruction *RTerm = RStart->getParent()->getTerminator();
636 if (I == LStart->getParent()->begin()) return;
649 if (I == RStart->getParent()->begin()) return;
tools/llvm-extract/llvm-extract.cpp 175 if (RegEx.match(GA->getName())) {
242 if (RegEx.match(F->getName())) {
tools/opt/AnalysisWrappers.cpp 36 if (!I->isDeclaration()) continue;
39 for (User *U : I->users()) {
51 errs() << "Function '" << I->getName() << "':\n";
tools/polly/lib/CodeGen/BlockGenerators.cpp 1563 BBCopyEnd->begin()->eraseFromParent();
1764 if (IP->getParent() != BBCopyEnd)
1767 if (IP->getParent() != BBCopyEnd)
tools/polly/lib/CodeGen/IslNodeBuilder.cpp 699 ParallelSubfunctions.push_back(LoopBody->getFunction());
unittests/ADT/IListTest.cpp 93 EXPECT_EQ(2, std::next(List.begin())->Value);
223 First->WasTransferred = true;
unittests/Analysis/CFGTest.cpp 64 if (I->hasName() && I->getName().startswith("excluded"))
64 if (I->hasName() && I->getName().startswith("excluded"))
unittests/Analysis/CGSCCPassManagerTest.cpp 1168 auto &H3F = *cast<CallInst>(H2F.begin()->begin())->getCalledFunction();
1170 H2F.begin()->begin()->eraseFromParent();
1170 H2F.begin()->begin()->eraseFromParent();
1174 "dummy", &*H2F.begin()->begin());
1216 auto &H3F = *cast<Function>(cast<BitCastInst>(H2F.begin()->begin())->getOperand(0));
1218 H2F.begin()->begin()->eraseFromParent();
1218 H2F.begin()->begin()->eraseFromParent();
1220 (void)CallInst::Create(&H3F, {}, "", &*H2F.begin()->begin());
unittests/Analysis/DomTreeUpdaterTest.cpp 183 EXPECT_EQ(F->begin()->getName(), NewEntry->getName());
558 EXPECT_EQ(F->begin()->getName(), NewEntry->getName());
unittests/Analysis/LoopInfoTest.cpp 191 ASSERT_EQ("entry", I->getName());
unittests/IR/DominatorTreeTest.cpp 269 EXPECT_EQ(F.begin()->getName(), NewEntry->getName());
unittests/IR/InstructionsTest.cpp 1030 EXPECT_EQ(Term, BB.begin()->getNextNonDebugInstruction());
1091 CallBrInst &CBI = cast<CallBrInst>(BBs->front());
unittests/IR/PassManagerTest.cpp 35 for (BasicBlock::iterator II = BBI->begin(), IE = BBI->end(); II != IE;
35 for (BasicBlock::iterator II = BBI->begin(), IE = BBI->end(); II != IE;
unittests/Target/AArch64/InstSizes.cpp 89 auto I = MF.begin()->begin();
104 auto I = MF.begin()->begin();
120 auto I = MF.begin()->begin();