/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | IfConversion.cpp | 489 BBInfo &BBI = Token->BBI; in INITIALIZE_PASS_DEPENDENCY() local 622 TII->insertBranch(*BBI.BB, BBI.FalseBB, BBI.TrueBB, BBI.BrCond, dl); in reverseBranchCondition() 623 std::swap(BBI.TrueBB, BBI.FalseBB); in reverseBranchCondition() 1022 BBI.TrueBB = BBI.FalseBB = nullptr; in AnalyzeBranches() 1025 !TII->analyzeBranch(*BBI.BB, BBI.TrueBB, BBI.FalseBB, BBI.BrCond); in AnalyzeBranches() 1035 BBI.HasFallThrough = BBI.IsBrAnalyzable && BBI.FalseBB == nullptr; in AnalyzeBranches() 1041 BBI.FalseBB = findFalseBlock(BBI.BB, BBI.TrueBB); in AnalyzeBranches() 1058 if (BBI.IsDone || BBI.IsUnpredicable) in ScanInstructions() 1239 if (!BBI.IsBrAnalyzable || BBI.BrCond.empty() || BBI.IsDone) { in AnalyzeBlock() 1557 BBI.NonPredSize -= TII->removeBranch(*BBI.BB); in IfConvertSimple() [all …]
|
H A D | LiveVariables.cpp | 769 for (const auto &BBI : MBB) { in analyzePHINodes() local 770 if (!BBI.isPHI()) in analyzePHINodes() 773 if (BBI.getOperand(i).readsReg()) in analyzePHINodes() 829 for (; BBI != BBE && BBI->isPHI(); ++BBI) { in addNewBlock() 831 Defs.insert(BBI->getOperand(0).getReg()); in addNewBlock() 835 if (BBI->getOperand(i+1).getMBB() == BB) in addNewBlock() 840 for (; BBI != BBE; ++BBI) { in addNewBlock() 886 BBI != BBE && BBI->isPHI(); ++BBI) { in addNewBlock() 888 if (BBI->getOperand(i + 1).getMBB() == BB && in addNewBlock() 889 BBI->getOperand(i).readsReg()) in addNewBlock() [all …]
|
H A D | PHIElimination.cpp | 661 for (const auto &BBI : MBB) { in analyzePHINodes() local 662 if (!BBI.isPHI()) in analyzePHINodes() 664 for (unsigned i = 1, e = BBI.getNumOperands(); i != e; i += 2) { in analyzePHINodes() 665 if (!BBI.getOperand(i).isUndef()) { in analyzePHINodes() 667 BBI.getOperand(i + 1).getMBB()->getNumber(), in analyzePHINodes() 668 BBI.getOperand(i).getReg())]; in analyzePHINodes() 687 BBI != BBE && BBI->isPHI(); ++BBI) { in SplitPHIEdges() 688 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) { in SplitPHIEdges() 689 Register Reg = BBI->getOperand(i).getReg(); in SplitPHIEdges() 690 MachineBasicBlock *PreMBB = BBI->getOperand(i+1).getMBB(); 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 | 215 BBI != BBE; ++BBI) { in generateProlog() 217 if (BBI->isPHI()) in generateProlog() 223 InstrMap[NewMI] = &*BBI; in generateProlog() 289 for (auto &BBI : *BB) { in generateEpilog() 290 if (BBI.isPHI()) in generateEpilog() 292 MachineInstr *In = &BBI; in generateEpilog() 382 BBI != BBE; ++BBI) { in generateExistingPhis() 387 getPhiRegs(*BBI, BB, InitVal, LoopVal); in generateExistingPhis() 554 InstrMap[NewPhi] = &*BBI; in generateExistingPhis() 621 BBI != BBE; ++BBI) { in generatePhis() [all …]
|
H A D | Analysis.cpp | 594 for (BasicBlock::const_iterator BBI = std::prev(ExitBB->end(), 2);; --BBI) { in isInTailCallPosition() local 595 if (&*BBI == &Call) in isInTailCallPosition() 599 if (BBI->isDebugOrPseudoInst()) in isInTailCallPosition() 603 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(BBI)) in isInTailCallPosition() 608 if (BBI->mayHaveSideEffects() || BBI->mayReadFromMemory() || in isInTailCallPosition() 609 !isSafeToSpeculativelyExecute(&*BBI)) in isInTailCallPosition()
|
H A D | CodeGenCommonISel.cpp | 35 MachineFunction::iterator BBI(ParentMBB); in addSuccessorMBB() local 37 MF->insert(++BBI, SuccMBB); in addSuccessorMBB()
|
/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 133 unsigned Opc = BBI->getOpcode(); in removeRedundantLIs() 139 if (!BBI->getOperand(1).isImm()) in removeRedundantLIs() 270 for (auto BBI = MBB.instr_begin(); BBI != MBB.instr_end(); ++BBI) { in addLinkerOpt() local 272 if (isGOTPLDpc(*BBI)) { in addLinkerOpt() 298 hasPCRelativeForm(*BBI) ? &BBI->getOperand(2) : nullptr; in addLinkerOpt() 303 Pair.UseInst = BBI; in addLinkerOpt() 320 ++BBI; in addLinkerOpt() 321 for (; BBI != Pair->UseInst; ++BBI) { in addLinkerOpt() 376 unsigned Opc = BBI.getOpcode(); in removeAccPrimeUnprime() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | ARMBasicBlockInfo.cpp | 48 BasicBlockInfo &BBI = BBInfo[MBB->getNumber()]; in computeBlockSize() local 49 BBI.Size = 0; in computeBlockSize() 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 | 63 bool processStore(StoreInst *SI, BasicBlock::iterator &BBI); 65 BasicBlock::iterator &BBI); 66 bool processMemSet(MemSetInst *SI, BasicBlock::iterator &BBI); 67 bool processMemCpy(MemCpyInst *M, BasicBlock::iterator &BBI);
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineLoadStoreAlloca.cpp | 1406 BasicBlock::iterator BBI(SI); in visitStoreInst() local 1409 --BBI; in visitStoreInst() 1412 if (BBI->isDebugOrPseudoInst()) { in visitStoreInst() 1449 if (BBI->mayWriteToMemory() || BBI->mayReadFromMemory() || BBI->mayThrow()) in visitStoreInst() 1531 --BBI; in mergeStoreIntoSuccessor() 1534 if (BBI==OtherBB->begin()) in mergeStoreIntoSuccessor() 1536 --BBI; in mergeStoreIntoSuccessor() 1553 for (;; --BBI) { in mergeStoreIntoSuccessor() 1561 if (BBI->mayReadFromMemory() || BBI->mayThrow() || in mergeStoreIntoSuccessor() 1562 BBI->mayWriteToMemory() || BBI == OtherBB->begin()) in mergeStoreIntoSuccessor() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | PlaceSafepoints.cpp | 476 for (BasicBlock::iterator BBI(Start), BBE0 = Start->getParent()->end(), in scanOneBB() local 478 BBI != BBE0 && BBI != BBE1; BBI++) { in scanOneBB() 479 if (CallInst *CI = dyn_cast<CallInst>(&*BBI)) in scanOneBB() 483 assert(!isa<InvokeInst>(&*BBI) && in scanOneBB() 488 if (BBI->isTerminator()) { in scanOneBB() 489 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() 645 BasicBlock::iterator BBI(CI); in eliminateCall() local 646 for (++BBI; &*BBI != Ret; ++BBI) { in eliminateCall() 647 if (canMoveAboveCall(&*BBI, CI, AA)) in eliminateCall() 654 if (AccPN || !canTransformAccumulatorRecursion(&*BBI, CI)) in eliminateCall() 659 AccRecInstr = &*BBI; in eliminateCall()
|
H A D | MemCpyOptimizer.cpp | 632 BasicBlock::iterator &BBI) { in processStoreOfLoad() argument 707 BBI = M->getIterator(); in processStoreOfLoad() 745 BBI = SI->getNextNonDebugInstruction()->getIterator(); in processStoreOfLoad() 757 bool MemCpyOptPass::processStore(StoreInst *SI, BasicBlock::iterator &BBI) { in processStore() argument 780 return processStoreOfLoad(SI, LI, DL, BBI); in processStore() 799 BBI = I->getIterator(); // Don't invalidate iterator. in processStore() 827 BBI = M->getIterator(); in processStore() 841 BBI = I->getIterator(); // Don't invalidate iterator. in processMemSet() 1662 ++BBI; in processMemCpy() 1670 ++BBI; in processMemCpy() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | LazyValueInfo.cpp | 590 switch (BBI->getOpcode()) { in getFromRangeMetadata() 625 if (!BBI || BBI->getParent() != BB) in solveBlockValueImpl() 628 if (PHINode *PN = dyn_cast<PHINode>(BBI)) in solveBlockValueImpl() 631 if (auto *SI = dyn_cast<SelectInst>(BBI)) in solveBlockValueImpl() 644 if (PT && isKnownNonZero(BBI, DL)) in solveBlockValueImpl() 647 if (BBI->getType()->isIntegerTy()) { in solveBlockValueImpl() 663 return getFromRangeMetadata(BBI); in solveBlockValueImpl() 788 BBI = BBI ? BBI : dyn_cast<Instruction>(Val); in intersectAssumeOrGuardBlockValueConstantRange() 789 if (!BBI) in intersectAssumeOrGuardBlockValueConstantRange() 792 BasicBlock *BB = BBI->getParent(); in intersectAssumeOrGuardBlockValueConstantRange() [all …]
|
H A D | Loads.cpp | 374 BasicBlock::iterator BBI = ScanFrom->getIterator(), in isSafeToLoadUnconditionally() local 381 while (BBI != E) { in isSafeToLoadUnconditionally() 382 --BBI; in isSafeToLoadUnconditionally() 386 if (isa<CallInst>(BBI) && BBI->mayWriteToMemory() && in isSafeToLoadUnconditionally() 387 !isa<LifetimeIntrinsic>(BBI) && !isa<DbgInfoIntrinsic>(BBI)) in isSafeToLoadUnconditionally() 393 if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) { in isSafeToLoadUnconditionally() 402 } else if (StoreInst *SI = dyn_cast<StoreInst>(BBI)) { in isSafeToLoadUnconditionally()
|
H A D | LoopPass.cpp | 50 auto BBI = llvm::find_if(L->blocks(), [](BasicBlock *BB) { return BB; }); in runOnLoop() local 51 if (BBI != L->blocks().end() && in runOnLoop() 52 isFunctionInPrintList((*BBI)->getParent()->getName())) { in runOnLoop()
|
/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 == SplitPreds[i]) in placeSplitBlockCarefully() 99 Function::iterator BBI = SplitPreds[i]->getIterator(); in placeSplitBlockCarefully() local 100 if (++BBI != NewBB->getParent()->end() && L->contains(&*BBI)) { in placeSplitBlockCarefully()
|
H A D | SimplifyCFG.cpp | 3321 for (BasicBlock::iterator BBI = BB->begin(); &*BBI != BI; ++BBI) { in FoldCondBranchOnValueKnownInPredecessorImpl() local 3331 if (BBI->hasName()) in FoldCondBranchOnValueKnownInPredecessorImpl() 3343 if (!BBI->use_empty()) in FoldCondBranchOnValueKnownInPredecessorImpl() 3351 if (!BBI->use_empty()) in FoldCondBranchOnValueKnownInPredecessorImpl() 4922 for (BasicBlock::iterator BBI = EdgeBB->begin(); isa<PHINode>(BBI); ++BBI) { in SimplifyBranchOnICmpChain() local 5248 --BBI; in simplifyUnreachable() 5262 BBI->dropDbgValues(); in simplifyUnreachable() 5265 BBI->replaceAllUsesWith(PoisonValue::get(BBI->getType())); in simplifyUnreachable() 5266 BBI->eraseFromParent(); in simplifyUnreachable() 5544 for (auto BBI = ContiguousDest->begin(); isa<PHINode>(BBI); ++BBI) { in TurnSwitchRangeIntoICmp() local [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()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
H A D | PGOInstrumentation.cpp | 1847 for (auto &BBI : F) { in fixFuncEntryCount() local 1850 if (!Func.findBBInfo(&BBI)) in fixFuncEntryCount() 1852 auto BFICount = NBFI.getBlockProfileCount(&BBI); in fixFuncEntryCount() 1853 CountValue = Func.getBBInfo(&BBI).CountValue; in fixFuncEntryCount() 1895 for (auto &BBI : F) { in verifyFuncBFI() local 1899 if (Func.getBBInfo(&BBI).CountValid) in verifyFuncBFI() 1900 CountValue = Func.getBBInfo(&BBI).CountValue; in verifyFuncBFI() 1905 auto BFICount = NBFI.getBlockProfileCount(&BBI); in verifyFuncBFI() 1937 F.getSubprogram(), &BBI); in verifyFuncBFI() 1938 Remark << "BB " << ore::NV("Block", BBI.getName()) in verifyFuncBFI()
|