Home
last modified time | relevance | path

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

12345678910>>...36

/llvm-project/llvm/include/llvm/IR/
H A DBasicBlock.h1 //===- llvm/BasicBlock.h - Represent a basic block in the VM ----*- C++ -*-===//
9 // This file contains the declaration of the BasicBlock class.
50 /// tables. The type of a BasicBlock is "Type::LabelTy" because the basic block
56 /// the blocks. The BasicBlock class allows malformed basic blocks to occur
60 class BasicBlock final : public Value, // Basic blocks are data objects also
61 public ilist_node_with_parent<BasicBlock, Function> {
64 ilist_parent<BasicBlock>>;
76 friend class SymbolTableListTraits<BasicBlock>;
132 /// BasicBlock::getMarker, this can be nullptr, a DbgMarker, or
164 explicit BasicBlock(LLVMContex
471 friend BasicBlock; global() variable
[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.h14 /// GraphTraits that allow Function and BasicBlock graphs to be treated as
25 #include "llvm/IR/BasicBlock.h"
38 // BasicBlock pred_iterator definition
104 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 *B in pred_end()
[all...]
H A DPredIteratorCache.h29 DenseMap<BasicBlock *, ArrayRef<BasicBlock *>> BlockToPredsMap;
35 size_t size(BasicBlock *BB) { return get(BB).size(); }
36 ArrayRef<BasicBlock *> get(BasicBlock *BB) {
37 ArrayRef<BasicBlock *> &Entry = BlockToPredsMap[BB];
41 SmallVector<BasicBlock *, 32> PredCache(predecessors(BB));
42 BasicBlock **Data = Memory.Allocate<BasicBlock *>(PredCache.size()); in GetPreds()
/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;
123 SmallVector<BasicBlock *> ExtractedFuncRetVals;
151 CodeExtractor(ArrayRef<BasicBlock *> BBs, DominatorTree *DT = nullptr,
156 BasicBlock *AllocationBloc
[all...]
H A DLoopConstrainer.h18 class BasicBlock; variable
37 BasicBlock *Header = nullptr;
38 BasicBlock *Latch = nullptr;
43 BasicBlock *LatchExit = nullptr;
68 Result.Header = cast<BasicBlock>(Map(Header)); in map()
69 Result.Latch = cast<BasicBlock>(Map(Latch)); in map()
71 Result.LatchExit = cast<BasicBlock>(Map(LatchExit)); in map()
113 std::vector<BasicBlock *> Blocks;
125 BasicBlock *PseudoExit = nullptr;
126 BasicBlock *ExitSelector = nullptr;
[all …]
/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 SmallSet<AssertingVH<const BasicBlock>, 16> LoopHeaders;
94 SmallPtrSet<const BasicBlock *, 16> LoopHeaders;
115 bool processBlock(BasicBlock *BB);
116 bool maybeMergeBasicBlockIntoOnlyPred(BasicBlock *BB);
117 void updateSSA(BasicBlock *BB, BasicBlock *NewBB,
120 BasicBlock
[all...]
/llvm-project/llvm/lib/IR/
H A DBasicBlock.cpp1 //===-- BasicBlock.cpp - Implement BasicBlock related methods -------------===//
9 // This file implements the BasicBlock class for the IR library.
13 #include "llvm/IR/BasicBlock.h"
52 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
181 BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent, BasicBlock() function in BasicBlock
[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 *From, BasicBlock *To);
97 DomTreeBuilder::BBPostDomTree &DT, BasicBlock *From, BasicBlock *To);
122 bool DominatorTree::dominates(const BasicBlock *BB, const Use &U) const { in dominates()
[all …]
/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 *BackedgeBloc
[all...]
H A DBranchProbabilityInfo.h19 #include "llvm/IR/BasicBlock.h"
157 BranchProbability getEdgeProbability(const BasicBlock *Src,
163 BranchProbability getEdgeProbability(const BasicBlock *Src,
164 const BasicBlock *Dst) const;
166 BranchProbability getEdgeProbability(const BasicBlock *Src,
173 bool isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const;
180 raw_ostream &printEdgeProbability(raw_ostream &OS, const BasicBlock *Src,
181 const BasicBlock *Dst) const;
189 void setEdgeProbability(const BasicBlock *Sr
[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 …]
/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.cpp19 #include "llvm/IR/BasicBlock.h"
37 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 *B
891 __anon378ee98b0702(const SmallSetVector<BasicBlock *, 2> &BBSet) applyInsertUpdates() argument
1348 removeBlocks(const SmallSetVector<BasicBlock *,8> & DeadBlocks) removeBlocks() argument
[all...]
/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.cpp1 //===- BasicBlockUtils.cpp - BasicBlock Utilities --------------------------==//
24 #include "llvm/IR/BasicBlock.h"
63 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 *B in DeleteDeadBlocks()
[all...]
H A DLoopUnrollRuntime.cpp29 #include "llvm/IR/BasicBlock.h"
83 BasicBlock *PrologExit, in ConnectProlog()
84 BasicBlock *OriginalLoopLatchExit, in ConnectProlog()
85 BasicBlock *PreHeader, BasicBlock *NewPreHeader, in ConnectProlog()
100 BasicBlock *Latch = L->getLoopLatch(); in ConnectProlog()
102 BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]); in ConnectProlog()
109 for (BasicBlock *Succ : successors(Latch)) { in ConnectProlog()
153 SmallVector<BasicBlock *, in ConnectProlog()
[all...]
/llvm-project/llvm/lib/Transforms/Scalar/
H A DStructurizeCFG.cpp23 #include "llvm/IR/BasicBlock.h"
76 using BBValuePair = std::pair<BasicBlock *, Value *>;
79 using BBVector = SmallVector<BasicBlock *, 8>;
83 using BBSet = SmallPtrSet<BasicBlock *, 8>;
86 using BB2BBVecMap = MapVector<BasicBlock *, BBVector>;
88 using BBPhiMap = DenseMap<BasicBlock *, PhiMap>;
128 using BBPredicates = DenseMap<BasicBlock *, PredInfo>;
129 using PredMap = DenseMap<BasicBlock *, BBPredicates>; in children()
130 using BB2BBMap = DenseMap<BasicBlock *, BasicBlock *>; in children()
657 findUndefBlocks(BasicBlock * PHIBlock,const SmallSet<BasicBlock *,8> & Incomings,SmallVector<BasicBlock * > & UndefBlks) const findUndefBlocks() argument
908 __anonfb7514aa0302(std::pair<BasicBlock *, Value *> Pred) dominatesPredicates() argument
[all...]
H A DDFAJumpThreading.cpp141 std::vector<BasicBlock *> *NewBBs); in DFAJumpThreading()
163 std::vector<BasicBlock *> NewBBs; in unfoldSelectInstrs()
192 std::vector<BasicBlock *> *NewBBs) { in createBasicBlockAndSinkSelectInst()
195 BasicBlock *StartBlock = SI->getParent(); in createBasicBlockAndSinkSelectInst()
203 BasicBlock *EndBlock = StartBlock->getUniqueSuccessor();
205 BasicBlock *NewBlock = BasicBlock::Create( in unfold()
240 for (BasicBlock *Pred : predecessors(EndBlock)) { in unfold()
262 BasicBlock *EndBlock = SIUse->getParent(); in unfold()
263 BasicBlock *NewBlock in unfold()
[all...]
H A DLoopSink.cpp78 static BlockFrequency adjustedSumFreq(SmallPtrSetImpl<BasicBlock *> &BBs, in adjustedSumFreq()
81 for (BasicBlock *B : BBs) in adjustedSumFreq()
115 static SmallPtrSet<BasicBlock *, 2>
116 findBBsToSinkInto(const Loop &L, const SmallPtrSetImpl<BasicBlock *> &UseBBs, in findBBsToSinkInto()
117 const SmallVectorImpl<BasicBlock *> &ColdLoopBBs, in findBBsToSinkInto()
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()
172 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...]
/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 …]
/llvm-project/llvm/lib/Transforms/IPO/
H A DPartialInlining.cpp30 #include "llvm/IR/BasicBlock.h"
156 SmallVector<BasicBlock *, 4> Entries;
159 BasicBlock *ReturnBlock = nullptr;
162 BasicBlock *NonReturnBlock = nullptr;
165 SmallVector<BasicBlock *, 4> ReturnBlockPreds;
173 OutlineRegionInfo(ArrayRef<BasicBlock *> Region, BasicBlock *EntryBlock, in OutlineRegionInfo()
174 BasicBlock *ExitBlock, BasicBlock *ReturnBlock) in OutlineRegionInfo()
177 SmallVector<BasicBlock *, in OutlineRegionInfo()
[all...]
/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 in calculateStateNumbersForInvokes()
1304 insertPHIStore(BasicBlock * PredBlock,Value * PredVal,AllocaInst * SpillSlot,SmallVectorImpl<std::pair<BasicBlock *,Value * >> & Worklist) insertPHIStore() argument
1318 replaceUseWithLoad(Value * V,Use & U,AllocaInst * & SpillSlot,DenseMap<BasicBlock *,Value * > & Loads,Function & F) replaceUseWithLoad() argument
[all...]

12345678910>>...36