Home
last modified time | relevance | path

Searched refs:BasicBlock (Results 1 – 25 of 693) sorted by relevance

12345678910>>...28

/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DBasicBlock.h60 class BasicBlock final : public Value, // Basic blocks are data objects also
61 public ilist_node_with_parent<BasicBlock, Function> {
64 ilist_parent<BasicBlock>>;
71 friend class SymbolTableListTraits<BasicBlock>;
154 explicit BasicBlock(LLVMContext &C, const Twine &Name = "",
156 BasicBlock *InsertBefore = nullptr);
159 BasicBlock(const BasicBlock &) = delete;
160 BasicBlock &operator=(const BasicBlock &) = delete;
161 ~BasicBlock();
174 friend BasicBlock::iterator Instruction::eraseFromParent();
[all …]
H A DDominators.h46 extern template class DomTreeNodeBase<BasicBlock>;
47 extern template class DominatorTreeBase<BasicBlock, false>; // DomTree
48 extern template class DominatorTreeBase<BasicBlock, true>; // PostDomTree
50 extern template class cfg::Update<BasicBlock *>;
53 using BBDomTree = DomTreeBase<BasicBlock>;
54 using BBPostDomTree = PostDomTreeBase<BasicBlock>;
56 using BBUpdates = ArrayRef<llvm::cfg::Update<BasicBlock *>>;
58 using BBDomTreeGraphDiff = GraphDiff<BasicBlock *, false>;
59 using BBPostDomTreeGraphDiff = GraphDiff<BasicBlock *, true>;
67 extern template void InsertEdge<BBDomTree>(BBDomTree &DT, BasicBlock *From,
[all …]
H A DCFG.h104 using pred_iterator = PredIterator<BasicBlock, Value::user_iterator>;
106 PredIterator<const BasicBlock, Value::const_user_iterator>;
110 inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); } in pred_begin()
111 inline const_pred_iterator pred_begin(const BasicBlock *BB) { in pred_begin()
114 inline pred_iterator pred_end(BasicBlock *BB) { return pred_iterator(BB, true);} in pred_end()
115 inline const_pred_iterator pred_end(const BasicBlock *BB) { in pred_end()
118 inline bool pred_empty(const BasicBlock *BB) { in pred_empty()
123 inline unsigned pred_size(const BasicBlock *BB) { in pred_size()
126 inline pred_range predecessors(BasicBlock *BB) { in predecessors()
129 inline const_pred_range predecessors(const BasicBlock *BB) { in predecessors()
[all …]
H A DPredIteratorCache.h29 mutable DenseMap<BasicBlock *, BasicBlock **> BlockToPredsMap;
30 mutable DenseMap<BasicBlock *, unsigned> BlockToPredCountMap;
42 BasicBlock **GetPreds(BasicBlock *BB) { in GetPreds()
43 BasicBlock **&Entry = BlockToPredsMap[BB]; in GetPreds()
47 SmallVector<BasicBlock *, 32> PredCache(predecessors(BB)); in GetPreds()
52 Entry = Memory.Allocate<BasicBlock *>(PredCache.size()); in GetPreds()
57 unsigned GetNumPreds(BasicBlock *BB) const { in GetNumPreds()
65 size_t size(BasicBlock *BB) const { return GetNumPreds(BB); } in size()
66 ArrayRef<BasicBlock *> get(BasicBlock *BB) { in get()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DJumpThreading.h32 class BasicBlock; variable
55 using PredValueInfo = SmallVectorImpl<std::pair<Constant *, BasicBlock *>>;
56 using PredValueInfoTy = SmallVector<std::pair<Constant *, BasicBlock *>, 8>;
92 SmallPtrSet<const BasicBlock *, 16> LoopHeaders;
94 SmallSet<AssertingVH<const BasicBlock>, 16> LoopHeaders;
115 bool processBlock(BasicBlock *BB);
116 bool maybeMergeBasicBlockIntoOnlyPred(BasicBlock *BB);
117 void updateSSA(BasicBlock *BB, BasicBlock *NewBB,
120 BasicBlock::iterator BI, BasicBlock::iterator BE,
121 BasicBlock *NewBB, BasicBlock *PredBB);
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DBasicBlockUtils.h1 //===- Transform/Utils/BasicBlockUtils.h - BasicBlock Utils -----*- C++ -*-===//
17 // FIXME: Move to this file: BasicBlock::removePredecessor, BB::splitBasicBlock
21 #include "llvm/IR/BasicBlock.h"
49 void detachDeadBlocks(ArrayRef <BasicBlock *> BBs,
54 void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr,
63 void DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs,
77 bool FoldSingleEntryPHINodes(BasicBlock *BB,
84 bool DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI = nullptr,
96 bool MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU = nullptr,
111 SmallPtrSetImpl<BasicBlock *>
[all...]
H A DCodeExtractor.h26 class BasicBlock; variable
51 DenseMap<BasicBlock *, DenseSet<Value *>> BaseMemAddrs;
55 DenseSet<BasicBlock *> SideEffectingBlocks;
57 void findSideEffectInfoForBlock(BasicBlock &BB);
69 bool doesBlockContainClobberOfAddr(BasicBlock &BB, AllocaInst *Addr) const;
98 BasicBlock *AllocationBlock;
104 SetVector<BasicBlock *> Blocks;
110 SmallVector<BasicBlock *, 4> OldTargets;
138 CodeExtractor(ArrayRef<BasicBlock *> BBs, DominatorTree *DT = nullptr,
143 BasicBlock *AllocationBlock = nullptr,
[all …]
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DBasicBlock.cpp52 DbgMarker *BasicBlock::createMarker(Instruction *I) { in createMarker()
63 DbgMarker *BasicBlock::createMarker(InstListType::iterator It) { in createMarker()
76 void BasicBlock::convertToNewDbgValues() { in convertToNewDbgValues()
115 void BasicBlock::convertFromNewDbgValues() { in convertFromNewDbgValues()
141 void BasicBlock::dumpDbgValues() const { in dumpDbgValues()
152 void BasicBlock::setIsNewDbgInfoFormat(bool NewFlag) { in setIsNewDbgInfoFormat()
158 void BasicBlock::setNewDbgInfoFormatFlag(bool NewFlag) { in setNewDbgInfoFormatFlag()
162 ValueSymbolTable *BasicBlock::getValueSymbolTable() { in getValueSymbolTable()
168 LLVMContext &BasicBlock::getContext() const { in getContext()
172 template <> void llvm::invalidateParentIListOrdering(BasicBlock *BB) { in invalidateParentIListOrdering()
[all …]
H A DDominators.cpp53 for (const BasicBlock *Succ : successors(Start)) { in isSingleEdge()
73 template class llvm::DomTreeNodeBase<BasicBlock>;
74 template class llvm::DominatorTreeBase<BasicBlock, false>; // DomTreeBase
75 template class llvm::DominatorTreeBase<BasicBlock, true>; // PostDomTreeBase
77 template class llvm::cfg::Update<BasicBlock *>;
90 DomTreeBuilder::BBDomTree &DT, BasicBlock *From, BasicBlock *To);
92 DomTreeBuilder::BBPostDomTree &DT, BasicBlock *From, BasicBlock *To);
95 DomTreeBuilder::BBDomTree &DT, BasicBlock *Fro
[all...]
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DMemorySSAUpdater.h44 class BasicBlock; variable
52 using CFGUpdate = cfg::Update<BasicBlock *>;
62 SmallPtrSet<BasicBlock *, 8> VisitedBlocks;
89 void removeEdge(BasicBlock *From, BasicBlock *To);
93 void removeDuplicatePhiEdgesBetween(const BasicBlock *From,
94 const BasicBlock *To);
96 void updatePhisWhenInsertingUniqueBackedgeBlock(BasicBlock *LoopHeader,
97 BasicBlock *LoopPreheader,
98 BasicBlock *BackedgeBlock);
104 ArrayRef<BasicBlock *> ExitBlocks,
[all …]
H A DBranchProbabilityInfo.h158 BranchProbability getEdgeProbability(const BasicBlock *Src,
164 BranchProbability getEdgeProbability(const BasicBlock *Src,
165 const BasicBlock *Dst) const;
167 BranchProbability getEdgeProbability(const BasicBlock *Src,
174 bool isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const;
181 raw_ostream &printEdgeProbability(raw_ostream &OS, const BasicBlock *Src,
182 const BasicBlock *Dst) const;
190 void setEdgeProbability(const BasicBlock *Src,
197 void copyEdgeProbabilities(BasicBlock *Src, BasicBlock *Dst);
200 void swapSuccEdgesProbabilities(const BasicBlock *Src);
[all …]
H A DCFG.h23 class BasicBlock; variable
37 SmallVectorImpl<std::pair<const BasicBlock *, const BasicBlock *> > &
43 unsigned GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ);
51 bool isCriticalEdge(const Instruction *TI, const BasicBlock *Succ,
71 const SmallPtrSetImpl<BasicBlock *> *ExclusionSet = nullptr,
81 const BasicBlock *From, const BasicBlock *To,
82 const SmallPtrSetImpl<BasicBlock *> *ExclusionSet = nullptr,
95 SmallVectorImpl<BasicBlock *> &Worklist, const BasicBlock *StopBB,
96 const SmallPtrSetImpl<BasicBlock *> *ExclusionSet,
106 SmallVectorImpl<BasicBlock *> &Worklist,
[all …]
H A DIteratedDominanceFrontier.h17 class BasicBlock; variable
22 template <bool IsPostDom> struct ChildrenGetterTy<BasicBlock, IsPostDom> {
23 using NodeRef = BasicBlock *;
24 using ChildrenTy = SmallVector<BasicBlock *, 8>;
27 ChildrenGetterTy(const GraphDiff<BasicBlock *, IsPostDom> *GD) : GD(GD) {
33 const GraphDiff<BasicBlock *, IsPostDom> *GD = nullptr;
39 class IDFCalculator final : public IDFCalculatorBase<BasicBlock, IsPostDom> {
42 typename llvm::IDFCalculatorBase<BasicBlock, IsPostDom>;
45 IDFCalculator(DominatorTreeBase<BasicBlock, IsPostDom> &DT)
48 IDFCalculator(DominatorTreeBase<BasicBlock, IsPostDom> &DT,
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DCFG.cpp35 SmallVectorImpl<std::pair<const BasicBlock*,const BasicBlock*> > &Result) { in FindFunctionBackedges() argument
36 const BasicBlock *BB = &F.getEntryBlock(); in FindFunctionBackedges()
40 SmallPtrSet<const BasicBlock*, 8> Visited; in FindFunctionBackedges()
41 SmallVector<std::pair<const BasicBlock *, const_succ_iterator>, 8> VisitStack; in FindFunctionBackedges()
42 SmallPtrSet<const BasicBlock*, 8> InStack; in FindFunctionBackedges()
48 std::pair<const BasicBlock *, const_succ_iterator> &Top = VisitStack.back(); in FindFunctionBackedges()
49 const BasicBlock *ParentBB = Top.first; in FindFunctionBackedges()
79 unsigned llvm::GetSuccessorNumber(const BasicBlock *BB, in GetSuccessorNumber()
80 const BasicBlock *Succ) { in GetSuccessorNumber()
101 bool llvm::isCriticalEdge(const Instruction *TI, const BasicBlock *Dest, in isCriticalEdge()
[all …]
H A DMemorySSAUpdater.cpp37 BasicBlock *BB, in getPreviousDefRecursive()
38 DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> &CachedPreviousDef) { in getPreviousDefRecursive() argument
49 if (BasicBlock *Pred = BB->getUniquePredecessor()) { in getPreviousDefRecursive()
140 DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> CachedPreviousDef; in getPreviousDef()
173 BasicBlock *BB, in getPreviousDefFromEnd()
174 DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> &CachedPreviousDef) { in getPreviousDefFromEnd() argument
264 SmallPtrSet<BasicBlock *, 16> Visited; in insertUse()
265 BasicBlock *StartBlock = MU->getBlock(); in insertUse()
285 static void setMemoryPhiValueForBlock(MemoryPhi *MP, const BasicBlock *BB, in setMemoryPhiValueForBlock()
293 for (const BasicBlock *BlockBB : llvm::drop_begin(MP->blocks(), i)) { in setMemoryPhiValueForBlock()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DFlattenCFG.cpp40 bool FlattenParallelAndOr(BasicBlock *BB, IRBuilder<> &Builder);
45 bool MergeIfRegion(BasicBlock *BB, IRBuilder<> &Builder);
52 bool CompareIfRegionBlock(BasicBlock *Block1, BasicBlock *Block2,
53 BasicBlock *Head2);
58 bool run(BasicBlock *BB);
136 bool FlattenCFGOpt::FlattenParallelAndOr(BasicBlock *BB, IRBuilder<> &Builder) { in FlattenParallelAndOr()
141 BasicBlock *LastCondBlock = nullptr; in FlattenParallelAndOr()
142 BasicBlock *FirstCondBlock = nullptr; in FlattenParallelAndOr()
143 BasicBlock *UnCondBlock = nullptr; in FlattenParallelAndOr()
147 SmallPtrSet<BasicBlock *, 16> Preds(pred_begin(BB), pred_end(BB)); in FlattenParallelAndOr()
[all …]
H A DBasicBlockUtils.cpp63 ArrayRef<BasicBlock *> BBs, in detachDeadBlocks()
69 SmallPtrSet<BasicBlock *, 4> UniqueSuccessors; in detachDeadBlocks()
70 for (BasicBlock *Succ : successors(BB)) { in detachDeadBlocks()
96 void llvm::DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU, in DeleteDeadBlock()
101 void llvm::DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs, DomTreeUpdater *DTU, in DeleteDeadBlocks()
105 SmallPtrSet<BasicBlock *, 4> Dead(BBs.begin(), BBs.end()); in DeleteDeadBlocks()
108 for (BasicBlock *Pred : predecessors(BB)) in DeleteDeadBlocks()
118 for (BasicBlock *BB : BBs) in DeleteDeadBlocks()
127 df_iterator_default_set<BasicBlock*> Reachable; in EliminateUnreachableBlocks()
130 for (BasicBlock *BB : depth_first_ext(&F, Reachable)) in EliminateUnreachableBlocks()
[all …]
H A DLoopUnrollRuntime.cpp84 BasicBlock *PrologExit, in ConnectProlog()
85 BasicBlock *OriginalLoopLatchExit, in ConnectProlog()
86 BasicBlock *PreHeader, BasicBlock *NewPreHeader, in ConnectProlog()
101 BasicBlock *Latch = L->getLoopLatch(); in ConnectProlog()
103 BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]); in ConnectProlog()
110 for (BasicBlock *Succ : successors(Latch)) { in ConnectProlog()
154 SmallVector<BasicBlock *, 4> PrologExitPreds; in ConnectProlog()
157 for (BasicBlock *PredBB : predecessors(PrologExit)) in ConnectProlog()
179 SmallVector<BasicBlock *, 4> Preds(predecessors(OriginalLoopLatchExit)); in ConnectProlog()
211 static void ConnectEpilog(Loop *L, Value *ModVal, BasicBlock *NewExit, in ConnectEpilog()
[all …]
H A DCloneFunction.cpp44 BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap, in CloneBasicBlock()
48 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "", F); in CloneBasicBlock()
194 for (const BasicBlock &BB : *OldFunc) { in CloneFunctionInto()
197 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo, in CloneFunctionInto()
211 const_cast<BasicBlock *>(&BB)); in CloneFunctionInto()
274 BB = cast<BasicBlock>(VMap[&OldFunc->front()])->getIterator(), in CloneFunctionInto()
369 Instruction *cloneInstruction(BasicBlock::const_iterator II);
384 void CloneBlock(const BasicBlock *BB, BasicBlock::const_iterator StartingInst,
385 std::vector<const BasicBlock *> &ToClone);
390 PruningFunctionCloner::cloneInstruction(BasicBlock::const_iterator II) { in cloneInstruction()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DStructurizeCFG.cpp75 using BBValuePair = std::pair<BasicBlock *, Value *>;
78 using BBVector = SmallVector<BasicBlock *, 8>;
82 using BBSet = SmallPtrSet<BasicBlock *, 8>;
85 using BB2BBVecMap = MapVector<BasicBlock *, BBVector>;
87 using BBPhiMap = DenseMap<BasicBlock *, PhiMap>;
88 using BBPredicates = DenseMap<BasicBlock *, Value *>;
89 using PredMap = DenseMap<BasicBlock *, BBPredicates>;
90 using BB2BBMap = DenseMap<BasicBlock *, BasicBlock *>;
92 using BranchDebugLocMap = DenseMap<BasicBlock *, DebugLoc>;
154 BasicBlock *Result = nullptr;
[all …]
H A DDFAJumpThreading.cpp136 std::vector<BasicBlock *> *NewBBs);
160 std::vector<BasicBlock *> NewBBs; in unfoldSelectInstrs()
183 BasicBlock *EndBlock, StringRef NewBBName, BasicBlock **NewBlock, in createBasicBlockAndSinkSelectInst()
185 std::vector<BasicBlock *> *NewBBs) { in createBasicBlockAndSinkSelectInst()
189 *NewBlock = BasicBlock::Create(SI->getContext(), NewBBName, in createBasicBlockAndSinkSelectInst()
207 std::vector<BasicBlock *> *NewBBs) { in unfold()
210 BasicBlock *StartBlock = SI->getParent(); in unfold()
211 BasicBlock *EndBlock = SIUse->getParent(); in unfold()
220 BasicBlock *TrueBlock = nullptr; in unfold()
221 BasicBlock *FalseBlock = nullptr; in unfold()
[all …]
H A DLoopSink.cpp78 static BlockFrequency adjustedSumFreq(SmallPtrSetImpl<BasicBlock *> &BBs,
81 for (BasicBlock *B : BBs) in adjustedSumFreq()
115 static SmallPtrSet<BasicBlock *, 2>
116 findBBsToSinkInto(const Loop &L, const SmallPtrSetImpl<BasicBlock *> &UseBBs,
117 const SmallVectorImpl<BasicBlock *> &ColdLoopBBs,
119 SmallPtrSet<BasicBlock *, 2> BBsToSinkInto; in findBBsToSinkInto()
124 SmallPtrSet<BasicBlock *, 2> BBsDominatedByColdestBB; in findBBsToSinkInto()
134 for (BasicBlock *ColdestBB : ColdLoopBBs) { in findBBsToSinkInto()
136 for (BasicBlock *SinkedBB : BBsToSinkInto) in findBBsToSinkInto()
143 for (BasicBlock *DominatedB in findBBsToSinkInto()
174 sinkInstruction(Loop & L,Instruction & I,const SmallVectorImpl<BasicBlock * > & ColdLoopBBs,const SmallDenseMap<BasicBlock *,int,16> & LoopBlockNumber,LoopInfo & LI,DominatorTree & DT,BlockFrequencyInfo & BFI,MemorySSAUpdater * MSSAU) sinkInstruction() argument
[all...]
/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DThreadSafetyTIL.cpp58 unsigned BasicBlock::addPredecessor(BasicBlock *Pred) { in addPredecessor()
71 void BasicBlock::reservePredecessors(unsigned NumPreds) { in reservePredecessors()
152 unsigned BasicBlock::renumberInstrs(unsigned ID) { in renumberInstrs()
165 unsigned BasicBlock::topologicalSort(SimpleArray<BasicBlock *> &Blocks, in topologicalSort()
189 unsigned BasicBlock::topologicalFinalSort(SimpleArray<BasicBlock *> &Blocks, in topologicalFinalSort()
208 void BasicBlock::computeDominator() { in computeDominator()
209 BasicBlock *Candidate = nullptr; in computeDominator()
235 void BasicBlock::computePostDominator() { in computePostDominator()
236 BasicBlock *Candidate = nullptr; in computePostDominator()
266 static inline void computeNodeSize(BasicBlock *B, in computeNodeSize()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DPartialInlining.cpp156 SmallVector<BasicBlock *, 4> Entries;
159 BasicBlock *ReturnBlock = nullptr;
162 BasicBlock *NonReturnBlock = nullptr;
165 SmallVector<BasicBlock *, 4> ReturnBlockPreds;
173 OutlineRegionInfo(ArrayRef<BasicBlock *> Region, in OutlineRegionInfo()
174 BasicBlock *EntryBlock, BasicBlock *ExitBlock, in OutlineRegionInfo()
175 BasicBlock *ReturnBlock) in OutlineRegionInfo()
178 SmallVector<BasicBlock *, 8> Region;
179 BasicBlock *EntryBlock;
180 BasicBlock *ExitBlock;
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DWinEHPrepare.cpp73 insertPHIStore(BasicBlock *PredBlock, Value *PredVal, AllocaInst *SpillSlot,
74 SmallVectorImpl<std::pair<BasicBlock *, Value *>> &Worklist);
77 DenseMap<BasicBlock *, Value *> &Loads, Function &F);
93 DenseMap<BasicBlock *, ColorVector> BlockColors;
94 MapVector<BasicBlock *, std::vector<BasicBlock *>> FuncletBlocks;
147 const BasicBlock *BB) { in addUnwindMapEntry()
182 static BasicBlock *getCleanupRetUnwindDest(const CleanupPadInst *CleanupPad) { in getCleanupRetUnwindDest()
192 DenseMap<BasicBlock *, ColorVector> BlockColors = colorEHFunclets(*F); in calculateStateNumbersForInvokes()
193 for (BasicBlock &BB : *F) { in calculateStateNumbersForInvokes()
200 BasicBlock *FuncletEntryBB = BBColors.front(); in calculateStateNumbersForInvokes()
[all …]

12345678910>>...28