/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | IfConversion.cpp | 171 BBInfo &BBI; member 181 : BBI(b), Kind(k), NumDups(d), NumDups2(d2), NeedSubsumption(s), in IfcvtToken() 226 bool reverseBranchCondition(BBInfo &BBI) const; 244 void AnalyzeBranches(BBInfo &BBI); 245 void ScanInstructions(BBInfo &BBI, 255 bool FeasibilityAnalysis(BBInfo &BBI, SmallVectorImpl<MachineOperand> &Pred, 261 bool IfConvertSimple(BBInfo &BBI, IfcvtKind Kind); 262 bool IfConvertTriangle(BBInfo &BBI, IfcvtKind Kind); 263 bool IfConvertDiamondCommon(BBInfo &BBI, BBInfo &TrueBBI, BBInfo &FalseBBI, 267 bool IfConvertDiamond(BBInfo &BBI, IfcvtKind Kind, [all …]
|
H A D | LiveVariables.cpp | 798 for (const auto &BBI : MBB) { in analyzePHINodes() local 799 if (!BBI.isPHI()) in analyzePHINodes() 801 for (unsigned i = 1, e = BBI.getNumOperands(); i != e; i += 2) in analyzePHINodes() 802 if (BBI.getOperand(i).readsReg()) in analyzePHINodes() 803 PHIVarInfo[BBI.getOperand(i + 1).getMBB()->getNumber()] in analyzePHINodes() 804 .push_back(BBI.getOperand(i).getReg()); in analyzePHINodes() 857 MachineBasicBlock::iterator BBI = SuccBB->begin(), BBE = SuccBB->end(); in addNewBlock() local 858 for (; BBI != BBE && BBI->isPHI(); ++BBI) { in addNewBlock() 860 Defs.insert(BBI->getOperand(0).getReg()); in addNewBlock() 863 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) in addNewBlock() [all …]
|
H A D | PHIElimination.cpp | 739 for (const auto &BBI : MBB) { in analyzePHINodes() local 740 if (!BBI.isPHI()) in analyzePHINodes() 742 for (unsigned i = 1, e = BBI.getNumOperands(); i != e; i += 2) { in analyzePHINodes() 743 if (!BBI.getOperand(i).isUndef()) { in analyzePHINodes() 745 BBI.getOperand(i + 1).getMBB()->getNumber(), in analyzePHINodes() 746 BBI.getOperand(i).getReg())]; in analyzePHINodes() 763 for (MachineBasicBlock::iterator BBI = MBB.begin(), BBE = MBB.end(); in SplitPHIEdges() local 764 BBI != BBE && BBI->isPHI(); ++BBI) { in SplitPHIEdges() 765 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) { in SplitPHIEdges() 766 Register Reg = BBI->getOperand(i).getReg(); in SplitPHIEdges() [all …]
|
H A D | MIRCanonicalizerPass.cpp | 232 for (auto BBI = MBB->instr_begin(); BBI != BBE; ++BBI) { in rescheduleCanonically() local 237 if (&*BBI == Def) { in rescheduleCanonically() 238 DefI = BBI; in rescheduleCanonically() 242 if (&*BBI == UseToBringDefCloserTo) { in rescheduleCanonically() 243 UseI = BBI; in rescheduleCanonically()
|
H A D | ModuloSchedule.cpp | 219 for (MachineBasicBlock::iterator BBI = BB->instr_begin(), in generateProlog() local 221 BBI != BBE; ++BBI) { in generateProlog() 222 if (Schedule.getStage(&*BBI) == StageNum) { in generateProlog() 223 if (BBI->isPHI()) in generateProlog() 226 cloneAndChangeInstr(&*BBI, i, (unsigned)StageNum); in generateProlog() 229 InstrMap[NewMI] = &*BBI; in generateProlog() 296 for (auto &BBI : *BB) { in generateEpilog() 297 if (BBI.isPHI()) in generateEpilog() 299 MachineInstr *In = &BBI; in generateEpilog() 387 for (MachineBasicBlock::iterator BBI = BB->instr_begin(), in generateExistingPhis() local [all …]
|
H A D | Analysis.cpp | 558 for (BasicBlock::const_iterator BBI = std::prev(ExitBB->end(), 2);; --BBI) { in isInTailCallPosition() local 559 if (&*BBI == &Call) in isInTailCallPosition() 563 if (BBI->isDebugOrPseudoInst()) in isInTailCallPosition() 567 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(BBI)) in isInTailCallPosition() 572 if (BBI->mayHaveSideEffects() || BBI->mayReadFromMemory() || in isInTailCallPosition() 573 !isSafeToSpeculativelyExecute(&*BBI)) in isInTailCallPosition()
|
H A D | CodeGenCommonISel.cpp | 35 MachineFunction::iterator BBI(ParentMBB); in addSuccessorMBB() local 37 MF->insert(++BBI, SuccMBB); in addSuccessorMBB()
|
H A D | BranchRelaxation.cpp | 164 const BasicBlockInfo &BBI = BlockInfo[MBB.getNumber()]; in scanFunction() 165 dbgs() << format("%%bb.%u\toffset=%08x\t", MBB.getNumber(), BBI.Offset) in scanFunction() 166 << format("size=%#x\n", BBI.Size); in scanFunction() 155 const BasicBlockInfo &BBI = BlockInfo[MBB.getNumber()]; dumpBBs() local
|
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
H A D | PPCPreEmitPeephole.cpp | 127 for (auto BBI = MBB.instr_begin(); BBI != MBB.instr_end(); ++BBI) { in removeRedundantLIs() local 130 if (InstrsToErase.contains(&*BBI)) in removeRedundantLIs() 133 unsigned Opc = BBI->getOpcode(); in removeRedundantLIs() 139 if (!BBI->getOperand(1).isImm()) in removeRedundantLIs() 141 assert(BBI->getOperand(0).isReg() && in removeRedundantLIs() 144 LLVM_DEBUG(dbgs() << "Scanning after load immediate: "; BBI->dump();); in removeRedundantLIs() 146 Register Reg = BBI->getOperand(0).getReg(); in removeRedundantLIs() 147 int64_t Imm = BBI->getOperand(1).getImm(); in removeRedundantLIs() 149 if (BBI->getOperand(0).isDead()) { in removeRedundantLIs() 150 DeadOrKillToUnset = &BBI->getOperand(0); in removeRedundantLIs() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | ARMBasicBlockInfo.cpp | 48 BasicBlockInfo &BBI = BBInfo[MBB->getNumber()]; in computeBlockSize() 49 BBI.Size = 0; in computeBlockSize() local 50 BBI.Unalign = 0; in computeBlockSize() 51 BBI.PostAlign = Align(1); in computeBlockSize() 54 BBI.Size += TII->getInstSizeInBytes(I); in computeBlockSize() 58 BBI.Unalign = isThumb ? 1 : 2; in computeBlockSize() 61 BBI.Unalign = 1; in computeBlockSize() 66 BBI.PostAlign = Align(4); in computeBlockSize()
|
H A D | ARMBasicBlockInfo.h | 147 void insert(unsigned BBNum, BasicBlockInfo BBI) { in insert() argument 148 BBInfo.insert(BBInfo.begin() + BBNum, BBI); in insert()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/ |
H A D | MemCpyOptimizer.h | 64 bool processStore(StoreInst *SI, BasicBlock::iterator &BBI); 66 BasicBlock::iterator &BBI); 67 bool processMemSet(MemSetInst *SI, BasicBlock::iterator &BBI); 68 bool processMemCpy(MemCpyInst *M, BasicBlock::iterator &BBI);
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineLoadStoreAlloca.cpp | 1405 BasicBlock::iterator BBI(SI); in visitStoreInst() local 1406 for (unsigned ScanInsts = 6; BBI != SI.getParent()->begin() && ScanInsts; in visitStoreInst() 1408 --BBI; in visitStoreInst() 1411 if (BBI->isDebugOrPseudoInst()) { in visitStoreInst() 1416 if (StoreInst *PrevSI = dyn_cast<StoreInst>(BBI)) { in visitStoreInst() 1436 if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) { in visitStoreInst() 1448 if (BBI->mayWriteToMemory() || BBI->mayReadFromMemory() || BBI->mayThrow()) in visitStoreInst() 1510 BasicBlock::iterator BBI(OtherBB->getTerminator()); in mergeStoreIntoSuccessor() local 1511 BranchInst *OtherBr = dyn_cast<BranchInst>(BBI); in mergeStoreIntoSuccessor() 1512 if (!OtherBr || BBI == OtherBB->begin()) in mergeStoreIntoSuccessor() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | LazyValueInfo.cpp | 423 solveBlockValueBinaryOp(BinaryOperator *BBI, BasicBlock *BB); 437 Instruction *BBI); 593 static ValueLatticeElement getFromRangeMetadata(Instruction *BBI) { in getFromRangeMetadata() argument 594 switch (BBI->getOpcode()) { in getFromRangeMetadata() 599 if (std::optional<ConstantRange> Range = cast<CallBase>(BBI)->getRange()) in getFromRangeMetadata() 603 if (MDNode *Ranges = BBI->getMetadata(LLVMContext::MD_range)) in getFromRangeMetadata() 604 if (isa<IntegerType>(BBI->getType())) { in getFromRangeMetadata() 632 Instruction *BBI = dyn_cast<Instruction>(Val); in solveBlockValueImpl() local 633 if (!BBI || BBI->getParent() != BB) in solveBlockValueImpl() 636 if (PHINode *PN = dyn_cast<PHINode>(BBI)) in solveBlockValueImpl() [all …]
|
H A D | Loads.cpp | 383 BasicBlock::iterator BBI = ScanFrom->getIterator(), in isSafeToLoadUnconditionally() local 390 while (BBI != E) { in isSafeToLoadUnconditionally() 391 --BBI; in isSafeToLoadUnconditionally() 395 if (isa<CallInst>(BBI) && BBI->mayWriteToMemory() && in isSafeToLoadUnconditionally() 396 !isa<LifetimeIntrinsic>(BBI) && !isa<DbgInfoIntrinsic>(BBI)) in isSafeToLoadUnconditionally() 402 if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) { in isSafeToLoadUnconditionally() 411 } else if (StoreInst *SI = dyn_cast<StoreInst>(BBI)) { in isSafeToLoadUnconditionally()
|
H A D | LoopPass.cpp | 51 auto BBI = llvm::find_if(L->blocks(), [](BasicBlock *BB) { return BB; }); in runOnLoop() local 52 if (BBI != L->blocks().end() && in runOnLoop() 53 isFunctionInPrintList((*BBI)->getParent()->getName())) { in runOnLoop()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | PlaceSafepoints.cpp | 478 for (BasicBlock::iterator BBI(Start), BBE0 = Start->getParent()->end(), in scanOneBB() local 480 BBI != BBE0 && BBI != BBE1; BBI++) { in scanOneBB() 481 if (CallInst *CI = dyn_cast<CallInst>(&*BBI)) in scanOneBB() 485 assert(!isa<InvokeInst>(&*BBI) && in scanOneBB() 490 if (BBI->isTerminator()) { in scanOneBB() 491 BasicBlock *BB = BBI->getParent(); in scanOneBB()
|
H A D | TailRecursionElimination.cpp | 470 BasicBlock::iterator BBI(TI); in findTRECandidate() local 472 CI = dyn_cast<CallInst>(BBI); in findTRECandidate() 476 if (BBI == BB->begin()) in findTRECandidate() 478 --BBI; in findTRECandidate() 647 BasicBlock::iterator BBI(CI); in eliminateCall() local 648 for (++BBI; &*BBI != Ret; ++BBI) { in eliminateCall() 649 if (canMoveAboveCall(&*BBI, CI, AA)) in eliminateCall() 656 if (AccPN || !canTransformAccumulatorRecursion(&*BBI, CI)) in eliminateCall() 661 AccRecInstr = &*BBI; in eliminateCall()
|
H A D | MemCpyOptimizer.cpp | 637 BasicBlock::iterator &BBI) { in processStoreOfLoad() argument 710 BBI = M->getIterator(); in processStoreOfLoad() 748 BBI = SI->getNextNonDebugInstruction()->getIterator(); in processStoreOfLoad() 760 bool MemCpyOptPass::processStore(StoreInst *SI, BasicBlock::iterator &BBI) { in processStore() argument 784 return processStoreOfLoad(SI, LI, DL, BBI); in processStore() 803 BBI = I->getIterator(); // Don't invalidate iterator. in processStore() 830 BBI = M->getIterator(); in processStore() 838 bool MemCpyOptPass::processMemSet(MemSetInst *MSI, BasicBlock::iterator &BBI) { in processMemSet() argument 844 BBI = I->getIterator(); // Don't invalidate iterator. in processMemSet() 1725 bool MemCpyOptPass::processMemCpy(MemCpyInst *M, BasicBlock::iterator &BBI) { in processMemCpy() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/IR/ |
H A D | SafepointIRVerifier.cpp | 558 for (auto &BBI : BlockMap) { in GCPtrTracker() local 559 gatherDominatingDefs(BBI.first, BBI.second->AvailableIn, DT); in GCPtrTracker() 560 transferBlock(BBI.first, *BBI.second, true); in GCPtrTracker() 616 for (auto &BBI : BlockMap) in recalculateBBsStates() local 617 Worklist.insert(BBI.first); in recalculateBBsStates()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/ |
H A D | ObjCARCContract.cpp | 448 BasicBlock::iterator BBI = Inst->getIterator(); in tryToPeepholeInstruction() local 455 if (BBI == InstParent->begin()) { in tryToPeepholeInstruction() 459 BBI = Pred->getTerminator()->getIterator(); in tryToPeepholeInstruction() 462 --BBI; in tryToPeepholeInstruction() 463 } while (IsNoopInstruction(&*BBI)); in tryToPeepholeInstruction() 465 if (GetRCIdentityRoot(&*BBI) == GetArgRCIdentityRoot(Inst)) { in tryToPeepholeInstruction()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/CSKY/ |
H A D | CSKYConstantIslandPass.cpp | 280 const BasicBlockInfo &BBI = BBInfo[J]; in dumpBBs() local 281 dbgs() << format("%08x %bb.%u\t", BBI.Offset, J) in dumpBBs() 584 BasicBlockInfo &BBI = BBInfo[MBB->getNumber()]; in computeBlockSize() local 585 BBI.Size = 0; in computeBlockSize() 588 BBI.Size += TII->getInstSizeInBytes(MI); in computeBlockSize() 783 const BasicBlockInfo &BBI = BBInfo[Block]; in isCPEntryInRange() 788 << format("%#x-%x\t", BBI.Offset, BBI.postOffset()) << *MI in isCPEntryInRange()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | LoopSimplify.cpp | 85 Function::iterator BBI = --NewBB->getIterator(); in placeSplitBlockCarefully() local 87 if (&*BBI == Pred) in placeSplitBlockCarefully() 99 Function::iterator BBI = Pred->getIterator(); in placeSplitBlockCarefully() local 100 if (++BBI != NewBB->getParent()->end() && L->contains(&*BBI)) { in placeSplitBlockCarefully()
|
H A D | SimplifyCFG.cpp | 3383 for (BasicBlock::iterator BBI = BB->begin(); &*BBI != BI; ++BBI) { in FoldCondBranchOnValueKnownInPredecessorImpl() local 3384 if (PHINode *PN = dyn_cast<PHINode>(BBI)) { in FoldCondBranchOnValueKnownInPredecessorImpl() 3389 Instruction *N = BBI->clone(); in FoldCondBranchOnValueKnownInPredecessorImpl() 3393 if (BBI->hasName()) in FoldCondBranchOnValueKnownInPredecessorImpl() 3394 N->setName(BBI->getName() + ".c"); in FoldCondBranchOnValueKnownInPredecessorImpl() 3405 if (!BBI->use_empty()) in FoldCondBranchOnValueKnownInPredecessorImpl() 3406 TranslateMap[&*BBI] = V; in FoldCondBranchOnValueKnownInPredecessorImpl() 3413 if (!BBI->use_empty()) in FoldCondBranchOnValueKnownInPredecessorImpl() 3414 TranslateMap[&*BBI] = N; in FoldCondBranchOnValueKnownInPredecessorImpl() 3420 for (; SrcDbgCursor != BBI; ++SrcDbgCursor) in FoldCondBranchOnValueKnownInPredecessorImpl() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
H A D | MipsConstantIslandPass.cpp | 427 const BasicBlockInfo &BBI = BBInfo[J]; in dumpBBs() local 428 dbgs() << format("%08x %bb.%u\t", BBI.Offset, J) in dumpBBs() 785 BasicBlockInfo &BBI = BBInfo[MBB->getNumber()]; in computeBlockSize() local 786 BBI.Size = 0; in computeBlockSize() 789 BBI.Size += TII->getInstSizeInBytes(MI); in computeBlockSize() 977 const BasicBlockInfo &BBI = BBInfo[Block]; in isCPEntryInRange() 982 << format("%#x-%x\t", BBI.Offset, BBI.postOffset()) << *MI in isCPEntryInRange()
|