Home
last modified time | relevance | path

Searched refs:BB (Results 1 – 25 of 793) sorted by relevance

12345678910>>...32

/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DBlockCoverageInference.cpp57 for (auto &BB : F) { in BlockCoverageInference() local
59 if (shouldInstrumentBlock(BB)) in BlockCoverageInference()
65 BlockCoverageInference::getDependencies(const BasicBlock &BB) const { in getDependencies()
66 assert(BB.getParent() == &F); in getDependencies()
68 auto It = PredecessorDependencies.find(&BB); in getDependencies()
71 It = SuccessorDependencies.find(&BB); in getDependencies()
80 for (auto &BB : F) { in getInstrumentedBlocksHash() local
81 if (shouldInstrumentBlock(BB)) { in getInstrumentedBlocksHash()
91 bool BlockCoverageInference::shouldInstrumentBlock(const BasicBlock &BB) const { in shouldInstrumentBlock()
92 assert(BB.getParent() == &F); in shouldInstrumentBlock()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/Mips/
H A DMips16ISelLowering.cpp165 MachineBasicBlock *BB) const { in EmitInstrWithCustomInserter()
168 return MipsTargetLowering::EmitInstrWithCustomInserter(MI, BB); in EmitInstrWithCustomInserter()
170 return emitSel16(Mips::BeqzRxImm16, MI, BB); in EmitInstrWithCustomInserter()
172 return emitSel16(Mips::BnezRxImm16, MI, BB); in EmitInstrWithCustomInserter()
174 return emitSeliT16(Mips::Bteqz16, Mips::CmpiRxImmX16, MI, BB); in EmitInstrWithCustomInserter()
176 return emitSeliT16(Mips::Bteqz16, Mips::SltiRxImmX16, MI, BB); in EmitInstrWithCustomInserter()
178 return emitSeliT16(Mips::Bteqz16, Mips::SltiuRxImmX16, MI, BB); in EmitInstrWithCustomInserter()
180 return emitSeliT16(Mips::Btnez16, Mips::CmpiRxImmX16, MI, BB); in EmitInstrWithCustomInserter()
182 return emitSeliT16(Mips::Btnez16, Mips::SltiRxImmX16, MI, BB); in EmitInstrWithCustomInserter()
184 return emitSeliT16(Mips::Btnez16, Mips::SltiuRxImmX16, MI, BB); in EmitInstrWithCustomInserter()
[all...]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DADCE.cpp103 BasicBlock *BB = nullptr; member
131 bool isLive(BasicBlock *BB) { return BlockInfo[BB].Live; } in isLive() argument
169 void markLive(BlockInfoType &BB);
170 void markLive(BasicBlock *BB) { markLive(BlockInfo[BB]); } in markLive() argument
197 void makeUnconditional(BasicBlock *BB, BasicBlock *Target);
230 for (auto &BB : F) { in initialize() local
231 NumInsts += BB.size(); in initialize()
232 auto &Info = BlockInfo[&BB]; in initialize()
233 Info.BB = &BB; in initialize()
234 Info.Terminator = BB.getTerminator(); in initialize()
[all …]
H A DJumpThreading.cpp149 static void updatePredecessorProfileMetadata(PHINode *PN, BasicBlock *BB) { in updatePredecessorProfileMetadata() argument
150 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in updatePredecessorProfileMetadata()
204 auto PredOutEdge = GetPredOutEdge(PN->getIncomingBlock(i), BB); in updatePredecessorProfileMetadata()
318 for (auto &BB : *F) in runImpl()
319 if (!DT.isReachableFromEntry(&BB)) in runImpl()
320 Unreachable.insert(&BB); in runImpl()
329 for (auto &BB : *F) { in runImpl()
330 if (Unreachable.count(&BB)) in runImpl()
332 while (processBlock(&BB)) // Thread all of the branches we can over BB. in runImpl()
338 RemoveRedundantDbgInstrs(&BB); in runImpl()
[all …]
H A DLoopSimplifyCFG.cpp50 static BasicBlock *getOnlyLiveSuccessor(BasicBlock *BB) { in getOnlyLiveSuccessor() argument
51 Instruction *TI = BB->getTerminator(); in getOnlyLiveSuccessor()
77 static void removeBlockFromLoops(BasicBlock *BB, Loop *FirstLoop, in removeBlockFromLoops() argument
81 assert(FirstLoop->contains(BB) && "Must be a loop block!"); in removeBlockFromLoops()
84 Current->removeBlockFromLoop(BB); in removeBlockFromLoops()
92 for (BasicBlock *BB : BBs) { in getInnermostLoopFor()
93 Loop *BBL = LI.getLoopFor(BB); in getInnermostLoopFor()
160 for (const BasicBlock *BB : S) in dump() local
161 dbgs() << "\t" << BB->getName() << "\n"; in dump()
166 for (const BasicBlock *BB : S) in dump() local
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionPrecedenceTracking.cpp40 const BasicBlock *BB) { in getFirstSpecialInstruction() argument
47 validate(BB); in getFirstSpecialInstruction()
50 if (!FirstSpecialInsts.contains(BB)) { in getFirstSpecialInstruction()
51 fill(BB); in getFirstSpecialInstruction()
52 assert(FirstSpecialInsts.contains(BB) && "Must be!"); in getFirstSpecialInstruction()
54 return FirstSpecialInsts[BB]; in getFirstSpecialInstruction()
58 const BasicBlock *BB) { in hasSpecialInstructions() argument
59 return getFirstSpecialInstruction(BB) != nullptr; in hasSpecialInstructions()
69 void InstructionPrecedenceTracking::fill(const BasicBlock *BB) { in fill() argument
70 FirstSpecialInsts.erase(BB); in fill()
[all …]
H A DCFG.cpp36 const BasicBlock *BB = &F.getEntryBlock(); in FindFunctionBackedges() local
37 if (succ_empty(BB)) in FindFunctionBackedges()
44 Visited.insert(BB); in FindFunctionBackedges()
45 VisitStack.push_back(std::make_pair(BB, succ_begin(BB))); in FindFunctionBackedges()
46 InStack.insert(BB); in FindFunctionBackedges()
54 BB = *I++; in FindFunctionBackedges()
55 if (Visited.insert(BB).second) { in FindFunctionBackedges()
60 if (InStack.count(BB)) in FindFunctionBackedges()
61 Result.push_back(std::make_pair(ParentBB, BB)); in FindFunctionBackedges()
66 InStack.insert(BB); in FindFunctionBackedges()
[all …]
H A DBranchProbabilityInfo.cpp231 for (const auto *BB : Scc) { in SccInfo() local
232 LLVM_DEBUG(dbgs() << " " << BB->getName()); in SccInfo()
233 SccNums[BB] = SccNum; in SccInfo()
234 calculateSccBlockType(BB, SccNum); in SccInfo()
240 int BranchProbabilityInfo::SccInfo::getSCCNum(const BasicBlock *BB) const { in getSCCNum()
241 auto SccIt = SccNums.find(BB); in getSCCNum()
251 const auto *BB = MapIt.first; in getSccEnterBlocks() local
252 if (isSCCHeader(BB, SccNum)) in getSccEnterBlocks()
253 for (const auto *Pred : predecessors(BB)) in getSccEnterBlocks()
255 Enters.push_back(const_cast<BasicBlock *>(BB)); in getSccEnterBlocks()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DMachineSSAUpdater.cpp65 bool MachineSSAUpdater::HasValueForBlock(MachineBasicBlock *BB) const { in HasValueForBlock()
66 return getAvailableVals(AV).count(BB); in HasValueForBlock()
71 void MachineSSAUpdater::AddAvailableValue(MachineBasicBlock *BB, Register V) { in AddAvailableValue() argument
72 getAvailableVals(AV)[BB] = V; in AddAvailableValue()
77 Register MachineSSAUpdater::GetValueAtEndOfBlock(MachineBasicBlock *BB) { in GetValueAtEndOfBlock() argument
78 return GetValueAtEndOfBlockInternal(BB); in GetValueAtEndOfBlock()
82 Register LookForIdenticalPHI(MachineBasicBlock *BB, in LookForIdenticalPHI() argument
84 if (BB->empty()) in LookForIdenticalPHI()
87 MachineBasicBlock::iterator I = BB->begin(); in LookForIdenticalPHI()
94 while (I != BB->end() && I->isPHI()) { in LookForIdenticalPHI()
[all …]
H A DUnreachableBlockElim.cpp109 for (MachineBasicBlock *BB : depth_first_ext(&F, Reachable)) in runOnMachineFunction()
110 (void)BB/* Mark all reachable blocks */; in runOnMachineFunction()
115 for (MachineBasicBlock &BB : F) { in runOnMachineFunction()
117 if (!Reachable.count(&BB)) { in runOnMachineFunction()
118 DeadBlocks.push_back(&BB); in runOnMachineFunction()
121 if (MLI) MLI->removeBlock(&BB); in runOnMachineFunction()
122 if (MDT && MDT->getNode(&BB)) MDT->eraseNode(&BB); in runOnMachineFunction()
124 while (!BB.succ_empty()) { in runOnMachineFunction()
125 MachineBasicBlock* succ = *BB.succ_begin(); in runOnMachineFunction()
130 Phi.getOperand(i).getMBB() == &BB) { in runOnMachineFunction()
[all …]
H A DWasmEHPrepare.cpp118 void prepareEHPad(BasicBlock *BB, bool NeedPersonality, unsigned Index = 0);
178 auto *BB = WL.pop_back_val(); in eraseDeadBBsAndChildren() local
179 if (!pred_empty(BB)) in eraseDeadBBsAndChildren()
181 WL.append(succ_begin(BB), succ_end(BB)); in eraseDeadBBsAndChildren()
182 DeleteDeadBlock(BB); in eraseDeadBBsAndChildren()
210 auto *BB = ThrowI->getParent(); in prepareThrows() local
211 SmallVector<BasicBlock *, 4> Succs(successors(BB)); in prepareThrows()
212 BB->erase(std::next(BasicBlock::iterator(ThrowI)), BB->end()); in prepareThrows()
213 IRB.SetInsertPoint(BB); in prepareThrows()
227 for (BasicBlock &BB : F) { in prepareEHPads()
[all …]
H A DIfConversion.cpp146 MachineBasicBlock *BB = nullptr; member
282 bool MeetIfcvtSizeLimit(MachineBasicBlock &BB, in MeetIfcvtSizeLimit() argument
285 return Cycle > 0 && TII->isProfitableToIfCvt(BB, Cycle, Extra, in MeetIfcvtSizeLimit()
292 const MachineFunction &MF = *TBBInfo.BB->getParent(); in MeetIfcvtSizeLimit()
294 MachineBasicBlock::iterator TIB = TBBInfo.BB->begin(); in MeetIfcvtSizeLimit()
295 MachineBasicBlock::iterator FIB = FBBInfo.BB->begin(); in MeetIfcvtSizeLimit()
296 MachineBasicBlock::iterator TIE = TBBInfo.BB->end(); in MeetIfcvtSizeLimit()
297 MachineBasicBlock::iterator FIE = FBBInfo.BB->end(); in MeetIfcvtSizeLimit()
301 *TBBInfo.BB, *FBBInfo.BB, in MeetIfcvtSizeLimit()
309 for (auto &I : make_range(TBBInfo.BB->begin(), TIB)) { in MeetIfcvtSizeLimit()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DCFG.h110 inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); } in pred_begin() argument
111 inline const_pred_iterator pred_begin(const BasicBlock *BB) { in pred_begin() argument
112 return const_pred_iterator(BB); in pred_begin()
114 inline pred_iterator pred_end(BasicBlock *BB) { return pred_iterator(BB, true);} in pred_end() argument
115 inline const_pred_iterator pred_end(const BasicBlock *BB) { in pred_end() argument
116 return const_pred_iterator(BB, true); in pred_end()
118 inline bool pred_empty(const BasicBlock *BB) { in pred_empty() argument
119 return pred_begin(BB) == pred_end(BB); in pred_empty()
123 inline unsigned pred_size(const BasicBlock *BB) { in pred_size() argument
124 return std::distance(pred_begin(BB), pred_end(BB)); in pred_size()
[all …]
H A DInstIterator.h38 BB_i_t BB; // BasicBlocksType::iterator variable
54 : BBs(II.BBs), BB(II.BB), BI(II.BI) {} in InstIterator()
58 : BBs(II.BBs), BB(II.BB), BI(II.BI) {} in InstIterator()
61 : BBs(&m.getBasicBlockList()), BB(BBs->begin()) { // begin ctor in InstIterator()
62 if (BB != BBs->end()) { in InstIterator()
63 BI = BB->begin(); in InstIterator()
69 : BBs(&m.getBasicBlockList()), BB(BBs->end()) { // end ctor in InstIterator()
73 inline BBIty &getBasicBlockIterator() { return BB; } in getBasicBlockIterator()
80 return BB == y.BB && (BB == BBs->end() || BI == y.BI);
96 while (BB == BBs->end() || BI == BB->begin()) {
[all …]
H A DPredIteratorCache.h42 BasicBlock **GetPreds(BasicBlock *BB) { in GetPreds() argument
43 BasicBlock **&Entry = BlockToPredsMap[BB]; in GetPreds()
47 SmallVector<BasicBlock *, 32> PredCache(predecessors(BB)); in GetPreds()
50 BlockToPredCountMap[BB] = PredCache.size() - 1; in GetPreds()
57 unsigned GetNumPreds(BasicBlock *BB) const { in GetNumPreds() argument
58 auto Result = BlockToPredCountMap.find(BB); in GetNumPreds()
61 return BlockToPredCountMap[BB] = pred_size(BB); in GetNumPreds()
65 size_t size(BasicBlock *BB) const { return GetNumPreds(BB); } in size() argument
66 ArrayRef<BasicBlock *> get(BasicBlock *BB) { in get() argument
67 return ArrayRef(GetPreds(BB), GetNumPreds(BB)); in get()
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DEHUtils.h26 auto GetStatus = [&](BlockT *BB) { in computeEHOnlyBlocks()
27 if (Statuses.contains(BB)) in computeEHOnlyBlocks()
28 return Statuses[BB]; in computeEHOnlyBlocks()
33 auto CheckPredecessors = [&](BlockT *BB, Status Stat) { in computeEHOnlyBlocks()
34 for (auto *PredBB : predecessors(BB)) { in computeEHOnlyBlocks()
44 auto AddSuccesors = [&](BlockT *BB) { in computeEHOnlyBlocks()
45 for (auto *SuccBB : successors(BB)) { in computeEHOnlyBlocks()
56 for (auto &BB : F) { in computeEHOnlyBlocks()
57 if (BB.isEHPad()) { in computeEHOnlyBlocks()
58 AddSuccesors(&BB); in computeEHOnlyBlocks()
[all …]
H A DInstructionPrecedenceTracking.h37 void fill(const BasicBlock *BB);
43 void validate(const BasicBlock *BB) const;
54 const Instruction *getFirstSpecialInstruction(const BasicBlock *BB);
58 bool hasSpecialInstructions(const BasicBlock *BB);
77 void insertInstructionTo(const Instruction *Inst, const BasicBlock *BB);
103 const Instruction *getFirstICFI(const BasicBlock *BB) { in getFirstICFI() argument
104 return getFirstSpecialInstruction(BB); in getFirstICFI()
109 bool hasICF(const BasicBlock *BB) { in hasICF() argument
110 return hasSpecialInstructions(BB); in hasICF()
125 const Instruction *getFirstMemoryWrite(const BasicBlock *BB) { in getFirstMemoryWrite() argument
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DHotColdSplitting.cpp103 bool blockEndsInUnreachable(const BasicBlock &BB) { in blockEndsInUnreachable() argument
104 if (!succ_empty(&BB)) in blockEndsInUnreachable()
106 if (BB.empty()) in blockEndsInUnreachable()
108 const Instruction *I = BB.getTerminator(); in blockEndsInUnreachable()
112 void analyzeProfMetadata(BasicBlock *BB, in analyzeProfMetadata() argument
116 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in analyzeProfMetadata()
138 bool unlikelyExecuted(BasicBlock &BB) { in unlikelyExecuted() argument
140 if (BB.isEHPad() || isa<ResumeInst>(BB.getTerminator())) in unlikelyExecuted()
145 for (Instruction &I : BB) in unlikelyExecuted()
153 if (blockEndsInUnreachable(BB)) { in unlikelyExecuted()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUUnifyDivergentExitNodes.cpp122 static bool isUniformlyReached(const UniformityInfo &UA, BasicBlock &BB) { in isUniformlyReached() argument
123 SmallVector<BasicBlock *, 8> Stack(predecessors(&BB)); in isUniformlyReached()
163 for (BasicBlock *BB : ReturningBlocks) { in unifyReturnBlockSet()
167 PN->addIncoming(BB->getTerminator()->getOperand(0), BB); in unifyReturnBlockSet()
170 BB->getTerminator()->eraseFromParent(); in unifyReturnBlockSet()
171 BranchInst::Create(NewRetBlock, BB); in unifyReturnBlockSet()
172 Updates.emplace_back(DominatorTree::Insert, BB, NewRetBlock); in unifyReturnBlockSet()
179 for (BasicBlock *BB : ReturningBlocks) { in unifyReturnBlockSet()
181 simplifyCFG(BB, *TTI, RequireAndPreserveDomTree ? &DTU : nullptr, in unifyReturnBlockSet()
216 PDT.roots(), [&](auto BB) { return !isUniformlyReached(UA, *BB); }); in run() argument
[all …]
H A DSIAnnotateControlFlow.cpp67 bool isTopOfStack(BasicBlock *BB);
71 void push(BasicBlock *BB, Value *Saved);
75 bool hasKill(const BasicBlock *BB);
89 bool closeControlFlow(BasicBlock *BB);
154 bool SIAnnotateControlFlow::isTopOfStack(BasicBlock *BB) { in isTopOfStack() argument
155 return !Stack.empty() && Stack.back().first == BB; in isTopOfStack()
164 void SIAnnotateControlFlow::push(BasicBlock *BB, Value *Saved) { in push() argument
165 Stack.push_back(std::pair(BB, Saved)); in push()
187 bool SIAnnotateControlFlow::hasKill(const BasicBlock *BB) { in hasKill() argument
188 for (const Instruction &I : *BB) { in hasKill()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DBasicBlockUtils.cpp66 for (auto *BB : BBs) { in detachDeadBlocks() local
70 for (BasicBlock *Succ : successors(BB)) { in detachDeadBlocks()
71 Succ->removePredecessor(BB, KeepOneInputPHIs); in detachDeadBlocks()
73 Updates->push_back({DominatorTree::Delete, BB, Succ}); in detachDeadBlocks()
77 while (!BB->empty()) { in detachDeadBlocks()
78 Instruction &I = BB->back(); in detachDeadBlocks()
86 BB->back().eraseFromParent(); in detachDeadBlocks()
88 new UnreachableInst(BB->getContext(), BB); in detachDeadBlocks()
89 assert(BB->size() == 1 && in detachDeadBlocks()
90 isa<UnreachableInst>(BB->getTerminator()) && in detachDeadBlocks()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DJumpThreading.h115 bool processBlock(BasicBlock *BB);
116 bool maybeMergeBasicBlockIntoOnlyPred(BasicBlock *BB);
117 void updateSSA(BasicBlock *BB, BasicBlock *NewBB,
122 bool tryThreadEdge(BasicBlock *BB,
125 void threadEdge(BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs,
128 BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs);
131 Value *V, BasicBlock *BB, jumpthreading::PredValueInfo &Result,
135 computeValueKnownInPredecessors(Value *V, BasicBlock *BB,
140 return computeValueKnownInPredecessorsImpl(V, BB, Result, Preference,
144 Constant *evaluateOnPredecessorEdge(BasicBlock *BB, BasicBlock *PredPredBB,
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlanHCFGBuilder.cpp63 void setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB);
64 void setRegionPredsFromBB(VPRegionBlock *VPBB, BasicBlock *BB);
66 VPBasicBlock *getOrCreateVPBB(BasicBlock *BB);
71 void createVPInstructionsForVPBB(VPBasicBlock *VPBB, BasicBlock *BB);
84 void PlainCFGBuilder::setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB) { in setVPBBPredsFromBB() argument
85 auto GetLatchOfExit = [this](BasicBlock *BB) -> BasicBlock * { in setVPBBPredsFromBB() argument
86 auto *SinglePred = BB->getSinglePredecessor(); in setVPBBPredsFromBB()
87 Loop *LoopForBB = LI->getLoopFor(BB); in setVPBBPredsFromBB()
96 if (auto *LatchBB = GetLatchOfExit(BB)) { in setVPBBPredsFromBB()
106 for (BasicBlock *Pred : predecessors(BB)) in setVPBBPredsFromBB()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DSafepointIRVerifier.cpp85 const BasicBlock* BB = PN->getParent(); in hasLiveIncomingEdge() local
87 for (const_pred_iterator PredIt(BB), End(BB, true); PredIt != End; ++PredIt) { in hasLiveIncomingEdge()
100 bool isDeadBlock(const BasicBlock *BB) const { in isDeadBlock()
101 return DeadBlocks.count(BB); in isDeadBlock()
114 bool hasLiveIncomingEdges(const BasicBlock *BB) const { in hasLiveIncomingEdges()
116 for (const_pred_iterator PredIt(BB), End(BB, true); PredIt != End; ++PredIt) { in hasLiveIncomingEdges()
129 for (const BasicBlock &BB : F) in processFunction() local
130 if (!DT.isReachableFromEntry(&BB)) in processFunction()
131 DeadBlocks.insert(&BB); in processFunction()
135 for (const BasicBlock *BB : RPOT) { in processFunction() local
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-stress/
H A Dllvm-stress.cpp160 : BB(Block), PT(PT), Ran(R), Context(BB->getContext()) { in Modifier()
323 BasicBlock *BB; member
338 LoadModifier(BasicBlock *BB, PieceTable *PT, Random *R) in LoadModifier()
339 : Modifier(BB, PT, R) {} in LoadModifier()
345 Value *V = new LoadInst(Ty, Ptr, "L", BB->getTerminator()); in Act()
351 StoreModifier(BasicBlock *BB, PieceTable *PT, Random *R) in StoreModifier()
352 : Modifier(BB, PT, R) {} in StoreModifier()
365 new StoreInst(Val, Ptr, BB->getTerminator()); in Act()
370 BinModifier(BasicBlock *BB, PieceTable *PT, Random *R) in BinModifier()
371 : Modifier(BB, PT, R) {} in BinModifier()
[all …]

12345678910>>...32