Home
last modified time | relevance | path

Searched full:bb (Results 1 – 25 of 1579) sorted by relevance

12345678910>>...64

/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DJumpThreading.cpp102 cl::desc("Max PHIs in BB to duplicate for jump threading"), cl::init(76),
127 // [Block BB]
149 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()
[all …]
H A DDFAJumpThreading.cpp14 // sw.bb sw.bb
19 // br sw.bb / | \
20 // sw.bb.2 sw.bb.3 sw.bb.1
323 BasicBlock *BB; member
343 for (const BasicBlock *BB : Path) { in operator <<() local
345 if (BB->hasName()) in operator <<()
346 raw_string_ostream(BBName) << BB->getName(); in operator <<()
348 raw_string_ostream(BBName) << BB; in operator <<()
370 void setDeterminator(const BasicBlock *BB) { DBB = BB; } in setDeterminator()
483 void addToQueue(Value *Val, BasicBlock *BB, in addToQueue()
[all …]
H A DADCE.cpp103 BasicBlock *BB = nullptr; member
105 /// Cache of BB->getTerminator().
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()
[all …]
H A DLoopSimplifyCFG.cpp47 /// If \p BB is a switch or a conditional branch, but only one of its successors
50 static BasicBlock *getOnlyLiveSuccessor(BasicBlock *BB) { in getOnlyLiveSuccessor() argument
51 Instruction *TI = BB->getTerminator(); in getOnlyLiveSuccessor()
76 /// Removes \p BB from all loops from [FirstLoop, LastLoop) in parent chain.
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
[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/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/include/llvm/IR/
H A DCFG.h67 explicit inline PredIterator(Ptr *bb) : It(bb->user_begin()) { in PredIterator() argument
70 inline PredIterator(Ptr *bb, bool) : It(bb->user_end()) {} in PredIterator() argument
110 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()
[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.h38 /// for (BasicBlock **PI = PredCache->GetPreds(BB); *PI; ++PI)
41 /// for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI)
42 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
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DIfConversion.cpp97 ICNotClassfied, // BB data valid, but not classified.
99 ICSimple, // BB is entry of an one split, no rejoin sub-CFG.
103 ICTriangle, // BB is entry of a triangle sub-CFG.
104 ICDiamond, // BB is entry of a diamond sub-CFG.
105 ICForkedDiamond // BB is entry of an almost diamond sub-CFG, with a
116 /// IsDone - True if BB is not to be considered for ifcvt.
117 /// IsBeingAnalyzed - True if BB is currently being analyzed.
118 /// IsAnalyzed - True if BB has been analyzed (info is still valid).
119 /// IsEnqueued - True if BB has been enqueued to be ifcvt'ed.
121 /// HasFallThrough - True if BB may fallthrough to the following BB.
[all …]
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 DMachineBlockPlacement.cpp271 BlockChain(BlockToChainMapType &BlockToChain, MachineBasicBlock *BB) in BlockChain() argument
272 : Blocks(1, BB), BlockToChain(BlockToChain) { in BlockChain()
273 assert(BB && "Cannot create a chain with a null basic block"); in BlockChain()
274 BlockToChain[BB] = this; in BlockChain()
289 bool remove(MachineBasicBlock* BB) { in remove() argument
291 if (*i == BB) { in remove()
305 void merge(MachineBasicBlock *BB, BlockChain *Chain) { in merge() argument
306 assert(BB && "Can't merge a null block."); in merge()
311 assert(!BlockToChain[BB] && in merge()
312 "Passed chain is null, but BB has entry in BlockToChain."); in merge()
[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 …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DRegionInfoImpl.h55 void RegionBase<Tr>::replaceEntry(BlockT *BB) { in replaceEntry() argument
56 this->entry.setPointer(BB); in replaceEntry()
60 void RegionBase<Tr>::replaceExit(BlockT *BB) { in replaceExit() argument
62 exit = BB; in replaceExit()
103 BlockT *BB = const_cast<BlockT *>(B); in contains() local
105 if (!DT->getNode(BB)) in contains()
114 return (DT->dominates(entry, BB) && in contains()
115 !(DT->dominates(exit, BB) && DT->dominates(entry, exit))); in contains()
132 for (BlockT *BB : ExitingBlocks) { in contains()
133 if (!contains(BB)) in contains()
154 outermostLoopInRegion(LoopInfoT * LI,BlockT * BB) outermostLoopInRegion() argument
241 verifyBBInRegion(BlockT * BB) verifyBBInRegion() argument
267 verifyWalk(BlockT * BB,std::set<BlockT * > * visited) verifyWalk() argument
326 getSubRegionNode(BlockT * BB) getSubRegionNode() argument
347 getBBNode(BlockT * BB) getBBNode() argument
363 getNode(BlockT * BB) getNode() argument
400 BlockT *BB = Element->template getNodeAs<BlockT>(); addSubRegion() local
492 for (const auto *BB : blocks()) print() local
546 BlockT *BB = Element->template getNodeAs<BlockT>(); verifyBBMap() local
554 isCommonDomFrontier(BlockT * BB,BlockT * entry,BlockT * exit) isCommonDomFrontier() argument
619 BlockT *BB = e->second; insertShortCut() local
736 BlockT *BB = N->getBlock(); buildRegionsTree() local
805 getRegionFor(BlockT * BB) getRegionFor() argument
810 setRegionFor(BlockT * BB,RegionT * R) setRegionFor() argument
821 getMaxRegionExit(BlockT * BB) getMaxRegionExit() argument
907 BlockT *BB = GraphTraits<FuncPtrT>::getEntryNode(&F); calculate() local
[all...]
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 …]
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
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 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 …]
/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/lib/Target/AMDGPU/
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);
153 /// Is BB the last block saved on the stack ?
154 bool SIAnnotateControlFlow::isTopOfStack(BasicBlock *BB) { in isTopOfStack() argument
155 return !Stack.empty() && Stack.back().first == BB; in isTopOfStack()
163 /// Push a BB and saved value to the control flow stack
164 void SIAnnotateControlFlow::push(BasicBlock *BB, Value *Saved) { in push() argument
165 Stack.push_back(std::pair(BB, Saved)); in push()
[all …]
H A DAMDGPUUnifyDivergentExitNodes.cpp120 /// \returns true if \p BB is reachable through only uniform branches.
122 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()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/FuzzMutate/
H A DRandomIRBuilder.cpp27 static std::vector<BasicBlock *> getDominators(BasicBlock *BB) { in getDominators() argument
29 DominatorTree DT(*BB->getParent()); in getDominators()
30 DomTreeNode *Node = DT.getNode(BB); in getDominators()
46 static std::vector<BasicBlock *> getDominatees(BasicBlock *BB) { in getDominatees() argument
47 DominatorTree DT(*BB->getParent()); in getDominatees()
49 DomTreeNode *Parent = DT.getNode(BB); in getDominatees()
109 Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB, in findOrCreateSource() argument
111 return findOrCreateSource(BB, Insts, {}, anyType()); in findOrCreateSource()
114 Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB, in findOrCreateSource() argument
134 Function *F = BB.getParent(); in findOrCreateSource()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DSampleProfileLoaderBaseImpl.h79 static pred_range getPredecessors(BasicBlock *BB) { return predecessors(BB); }
80 static succ_range getSuccessors(BasicBlock *BB) { return successors(BB); }
222 PredRangeT getPredecessors(BasicBlockT *BB) {
223 return afdo_detail::IRTraits<BT>::getPredecessors(BB);
225 SuccRangeT getSuccessors(BasicBlockT *BB) {
226 return afdo_detail::IRTraits<BT>::getSuccessors(BB);
233 ErrorOr<uint64_t> getBlockWeight(const BasicBlockT *BB);
239 void printBlockWeight(raw_ostream &OS, const BasicBlockT *BB) const;
240 void printBlockEquivalence(raw_ostream &OS, const BasicBlockT *BB);
364 /// Print the equivalence class of block \p BB on stream \p OS.
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonCopyHoisting.cpp9 // present in all the successor of a basic block (BB) to the end of BB.
61 bool analyzeCopy(MachineBasicBlock *BB);
97 // that are present in all the successors of BB to BB. in runOnMachineFunction()
99 for (MachineBasicBlock *BB : post_order(&Fn)) { in runOnMachineFunction()
100 if (!BB->empty()) { in runOnMachineFunction()
101 if (BB->pred_size() != 1) in runOnMachineFunction()
103 auto &BBCopyInst = CopyMIList[BB->getNumber()]; in runOnMachineFunction()
105 Changed |= analyzeCopy(*BB->pred_begin()); in runOnMachineFunction()
122 for (MachineBasicBlock &BB : *MFN) { in collectCopyInst()
124 auto &BBCopyInst = CopyMIList[BB.getNumber()]; in collectCopyInst()
[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 …]
/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 …]

12345678910>>...64