Home
last modified time | relevance | path

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

12345678910>>...14

/external/llvm/include/llvm/Transforms/Utils/
DBasicBlockUtils.h33 void DeleteDeadBlock(BasicBlock *BB);
40 void FoldSingleEntryPHINodes(BasicBlock *BB, Pass *P = 0);
47 bool DeleteDeadPHIs(BasicBlock *BB);
51 bool MergeBlockIntoPredecessor(BasicBlock *BB, Pass *P = 0);
56 void ReplaceInstWithValue(BasicBlock::InstListType &BIL,
57 BasicBlock::iterator &BI, Value *V);
63 void ReplaceInstWithInst(BasicBlock::InstListType &BIL,
64 BasicBlock::iterator &BI, Instruction *I);
77 SmallVectorImpl<std::pair<const BasicBlock*,const BasicBlock*> > &Result);
84 unsigned GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ);
[all …]
/external/llvm/lib/VMCore/
DBasicBlock.cpp27 ValueSymbolTable *BasicBlock::getValueSymbolTable() { in getValueSymbolTable()
33 LLVMContext &BasicBlock::getContext() const { in getContext()
39 template class llvm::SymbolTableListTraits<Instruction, BasicBlock>;
42 BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent, in BasicBlock() function in BasicBlock
43 BasicBlock *InsertBefore) in BasicBlock()
61 BasicBlock::~BasicBlock() { in ~BasicBlock()
85 void BasicBlock::setParent(Function *parent) { in setParent()
96 void BasicBlock::removeFromParent() { in removeFromParent()
100 void BasicBlock::eraseFromParent() { in eraseFromParent()
106 void BasicBlock::moveBefore(BasicBlock *MovePos) { in moveBefore()
[all …]
/external/llvm/include/llvm/Analysis/
DBranchProbabilityInfo.h54 BranchProbability getEdgeProbability(const BasicBlock *Src,
55 const BasicBlock *Dst) const;
61 bool isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const;
67 BasicBlock *getHotSucc(BasicBlock *BB) const;
74 raw_ostream &printEdgeProbability(raw_ostream &OS, const BasicBlock *Src,
75 const BasicBlock *Dst) const;
83 uint32_t getEdgeWeight(const BasicBlock *Src, const BasicBlock *Dst) const;
91 void setEdgeWeight(const BasicBlock *Src, const BasicBlock *Dst,
95 typedef std::pair<const BasicBlock *, const BasicBlock *> Edge;
114 SmallPtrSet<BasicBlock *, 16> PostDominatedByUnreachable;
[all …]
DRegionInfo.h73 PointerIntPair<BasicBlock*, 1, bool> entry;
88 inline RegionNode(Region* Parent, BasicBlock* Entry, bool isSubRegion = 0)
107 inline BasicBlock* getEntry() const { return entry.getPointer(); } in getEntry()
131 inline BasicBlock* RegionNode::getNodeAs<BasicBlock>() const {
217 BasicBlock *exit;
224 typedef std::map<BasicBlock*, RegionNode*> BBNodeMapT;
231 void verifyBBInRegion(BasicBlock* BB) const;
236 void verifyWalk(BasicBlock* BB, std::set<BasicBlock*>* visitedBB) const;
251 Region(BasicBlock *Entry, BasicBlock *Exit, RegionInfo* RI,
259 BasicBlock *getEntry() const { return RegionNode::getEntry(); } in getEntry()
[all …]
DLoopIterator.h42 typedef std::vector<BasicBlock*>::const_iterator POIterator;
43 typedef std::vector<BasicBlock*>::const_reverse_iterator RPOIterator;
53 DenseMap<BasicBlock*, unsigned> PostNumbers;
54 std::vector<BasicBlock*> PostBlocks;
85 bool hasPreorder(BasicBlock *BB) const { return PostNumbers.count(BB); } in hasPreorder()
88 bool hasPostorder(BasicBlock *BB) const { in hasPostorder()
89 DenseMap<BasicBlock*, unsigned>::const_iterator I = PostNumbers.find(BB); in hasPostorder()
94 unsigned getPostorder(BasicBlock *BB) const { in getPostorder()
95 DenseMap<BasicBlock*, unsigned>::const_iterator I = PostNumbers.find(BB); in getPostorder()
102 unsigned getRPO(BasicBlock *BB) const { in getRPO()
[all …]
DPostDominators.h26 DominatorTreeBase<BasicBlock>* DT;
30 DT = new DominatorTreeBase<BasicBlock>(true); in PostDominatorTree()
41 inline const std::vector<BasicBlock*> &getRoots() const { in getRoots()
49 inline DomTreeNode *operator[](BasicBlock *BB) const {
53 inline DomTreeNode *getNode(BasicBlock *BB) const { in getNode()
61 inline bool dominates(const BasicBlock* A, const BasicBlock* B) const { in dominates()
69 inline bool properlyDominates(BasicBlock* A, BasicBlock* B) const { in properlyDominates()
73 inline BasicBlock *findNearestCommonDominator(BasicBlock *A, BasicBlock *B) { in findNearestCommonDominator()
DInterval.h28 class BasicBlock; variable
41 BasicBlock *HeaderNode;
43 typedef std::vector<BasicBlock*>::iterator succ_iterator;
44 typedef std::vector<BasicBlock*>::iterator pred_iterator;
45 typedef std::vector<BasicBlock*>::iterator node_iterator;
47 inline Interval(BasicBlock *Header) : HeaderNode(Header) { in Interval()
54 inline BasicBlock *getHeaderNode() const { return HeaderNode; } in getHeaderNode()
58 std::vector<BasicBlock*> Nodes;
64 std::vector<BasicBlock*> Successors;
69 std::vector<BasicBlock*> Predecessors;
[all …]
DLazyValueInfo.h53 BasicBlock *FromBB, BasicBlock *ToBB);
58 Constant *getConstant(Value *V, BasicBlock *BB);
62 Constant *getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB);
66 void threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc);
69 void eraseBlock(BasicBlock *BB);
/external/llvm/include/llvm/
DBasicBlock.h31 : public SymbolTableListTraits<Instruction, BasicBlock> {
70 class BasicBlock : public Value, // Basic blocks are data objects also
71 public ilist_node<BasicBlock> {
80 friend class SymbolTableListTraits<BasicBlock, Function>;
82 BasicBlock(const BasicBlock &); // Do not implement
83 void operator=(const BasicBlock &); // Do not implement
89 explicit BasicBlock(LLVMContext &C, const Twine &Name = "",
90 Function *Parent = 0, BasicBlock *InsertBefore = 0);
102 static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "",
103 Function *Parent = 0,BasicBlock *InsertBefore = 0) {
[all …]
DInstructions.h64 const Twine &Name, BasicBlock *InsertAtEnd);
67 AllocaInst(Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd);
72 const Twine &Name, BasicBlock *InsertAtEnd);
142 LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd);
146 BasicBlock *InsertAtEnd);
150 unsigned Align, BasicBlock *InsertAtEnd);
158 BasicBlock *InsertAtEnd);
161 LoadInst(Value *Ptr, const char *NameStr, BasicBlock *InsertAtEnd);
165 BasicBlock *InsertAtEnd);
266 StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
[all …]
DFunction.h34 template<> struct ilist_traits<BasicBlock>
35 : public SymbolTableListTraits<BasicBlock, Function> {
39 BasicBlock *createSentinel() const {
40 return static_cast<BasicBlock*>(&Sentinel);
42 static void destroySentinel(BasicBlock*) {}
44 BasicBlock *provideInitialHead() const { return createSentinel(); }
45 BasicBlock *ensureHead(BasicBlock*) const { return createSentinel(); }
46 static void noteHead(BasicBlock*, BasicBlock*) {}
50 mutable ilist_half_node<BasicBlock> Sentinel;
74 typedef iplist<BasicBlock> BasicBlockListType;
[all …]
/external/llvm/lib/Transforms/Utils/
DBasicBlockUtils.cpp35 void llvm::DeleteDeadBlock(BasicBlock *BB) { in DeleteDeadBlock()
67 void llvm::FoldSingleEntryPHINodes(BasicBlock *BB, Pass *P) { in FoldSingleEntryPHINodes()
97 bool llvm::DeleteDeadPHIs(BasicBlock *BB) { in DeleteDeadPHIs()
101 for (BasicBlock::iterator I = BB->begin(); in DeleteDeadPHIs()
115 bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, Pass *P) { in MergeBlockIntoPredecessor()
120 BasicBlock *PredBB = BB->getUniquePredecessor(); in MergeBlockIntoPredecessor()
129 BasicBlock *OnlySucc = BB; in MergeBlockIntoPredecessor()
140 for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) { in MergeBlockIntoPredecessor()
196 void llvm::ReplaceInstWithValue(BasicBlock::InstListType &BIL, in ReplaceInstWithValue()
197 BasicBlock::iterator &BI, Value *V) { in ReplaceInstWithValue()
[all …]
DLoopSimplify.cpp100 BasicBlock *RewriteLoopExitBlock(Loop *L, BasicBlock *Exit);
101 BasicBlock *InsertPreheaderForLoop(Loop *L);
103 BasicBlock *Preheader);
104 BasicBlock *InsertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader);
105 void PlaceSplitBlockCarefully(BasicBlock *NewBB,
106 SmallVectorImpl<BasicBlock*> &SplitPreds,
154 SmallPtrSet<BasicBlock*, 4> BadPreds; in ProcessLoop()
157 BasicBlock *P = *PI; in ProcessLoop()
163 for (SmallPtrSet<BasicBlock*, 4>::iterator I = BadPreds.begin(), in ProcessLoop()
184 SmallVector<BasicBlock*, 8> ExitingBlocks; in ProcessLoop()
[all …]
DLowerSwitch.cpp52 BasicBlock* BB;
54 CaseRange(Constant *low = 0, Constant *high = 0, BasicBlock *bb = 0) : in CaseRange()
63 BasicBlock* switchConvert(CaseItr Begin, CaseItr End, Value* Val,
64 BasicBlock* OrigBlock, BasicBlock* Default);
65 BasicBlock* newLeafBlock(CaseRange& Leaf, Value* Val,
66 BasicBlock* OrigBlock, BasicBlock* Default);
98 BasicBlock *Cur = I++; // Advance over block so we don't traverse new blocks in runOnFunction()
130 BasicBlock* LowerSwitch::switchConvert(CaseItr Begin, CaseItr End, in switchConvert()
131 Value* Val, BasicBlock* OrigBlock, in switchConvert()
132 BasicBlock* Default) in switchConvert()
[all …]
DLoopUnrollRuntime.cpp57 BasicBlock *LastPrologBB, BasicBlock *PrologEnd, in ConnectProlog()
58 BasicBlock *OrigPH, BasicBlock *NewPH, in ConnectProlog()
60 BasicBlock *Latch = L->getLoopLatch(); in ConnectProlog()
70 for (BasicBlock::iterator BBI = (*SBI)->begin(); in ConnectProlog()
112 BasicBlock *Exit = L->getUniqueExitBlock(); in ConnectProlog()
115 SmallVector<BasicBlock*, 4> Preds(pred_begin(Exit), pred_end(Exit)); in ConnectProlog()
119 SmallVector<BasicBlock*, 2> NewBBs; in ConnectProlog()
138 BasicBlock *InsertTop, in CloneLoopBlocks()
139 BasicBlock *InsertBot, in CloneLoopBlocks()
140 std::vector<BasicBlock *> &NewBlocks, in CloneLoopBlocks()
[all …]
DCloneFunction.cpp37 BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, in CloneBasicBlock()
41 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "", F); in CloneBasicBlock()
47 for (BasicBlock::const_iterator II = BB->begin(), IE = BB->end(); in CloneBasicBlock()
115 const BasicBlock &BB = *BI; in CloneFunctionInto()
118 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo); in CloneFunctionInto()
131 const_cast<BasicBlock*>(&BB)); in CloneFunctionInto()
142 for (Function::iterator BB = cast<BasicBlock>(VMap[OldFunc->begin()]), in CloneFunctionInto()
145 for (BasicBlock::iterator II = BB->begin(); II != BB->end(); ++II) in CloneFunctionInto()
220 void CloneBlock(const BasicBlock *BB,
221 std::vector<const BasicBlock*> &ToClone);
[all …]
DLCSSA.cpp56 std::vector<BasicBlock*> LoopBlocks;
76 const SmallVectorImpl<BasicBlock*> &ExitBlocks);
85 bool inLoop(BasicBlock *B) const { in inLoop()
103 static bool BlockDominatesAnExit(BasicBlock *BB, in BlockDominatesAnExit()
104 const SmallVectorImpl<BasicBlock*> &ExitBlocks, in BlockDominatesAnExit()
122 SmallVector<BasicBlock*, 8> ExitBlocks; in runOnLoop()
139 BasicBlock *BB = *BBI; in runOnLoop()
147 for (BasicBlock::iterator I = BB->begin(), E = BB->end(); in runOnLoop()
167 static bool isExitBlock(BasicBlock *BB, in isExitBlock()
168 const SmallVectorImpl<BasicBlock*> &ExitBlocks) { in isExitBlock()
[all …]
/external/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp88 static uint32_t getMaxWeightFor(BasicBlock *BB) { in getMaxWeightFor()
97 bool BranchProbabilityInfo::calcUnreachableHeuristics(BasicBlock *BB) { in calcUnreachableHeuristics()
105 SmallPtrSet<BasicBlock *, 4> UnreachableEdges; in calcUnreachableHeuristics()
106 SmallPtrSet<BasicBlock *, 4> ReachableEdges; in calcUnreachableHeuristics()
127 for (SmallPtrSet<BasicBlock *, 4>::iterator I = UnreachableEdges.begin(), in calcUnreachableHeuristics()
136 for (SmallPtrSet<BasicBlock *, 4>::iterator I = ReachableEdges.begin(), in calcUnreachableHeuristics()
146 bool BranchProbabilityInfo::calcMetadataWeights(BasicBlock *BB) { in calcMetadataWeights()
184 bool BranchProbabilityInfo::calcPointerHeuristics(BasicBlock *BB) { in calcPointerHeuristics()
201 BasicBlock *Taken = BI->getSuccessor(0); in calcPointerHeuristics()
202 BasicBlock *NonTaken = BI->getSuccessor(1); in calcPointerHeuristics()
[all …]
DRegionInfo.cpp56 Region::Region(BasicBlock *Entry, BasicBlock *Exit, RegionInfo* RInfo, in Region()
74 void Region::replaceEntry(BasicBlock *BB) { in replaceEntry()
78 void Region::replaceExit(BasicBlock *BB) { in replaceExit()
83 bool Region::contains(const BasicBlock *B) const { in contains()
84 BasicBlock *BB = const_cast<BasicBlock*>(B); in contains()
88 BasicBlock *entry = getEntry(), *exit = getExit(); in contains()
108 SmallVector<BasicBlock *, 8> ExitingBlocks; in contains()
111 for (SmallVectorImpl<BasicBlock*>::iterator BI = ExitingBlocks.begin(), in contains()
130 Loop *Region::outermostLoopInRegion(LoopInfo *LI, BasicBlock* BB) const { in outermostLoopInRegion()
136 BasicBlock *Region::getEnteringBlock() const { in getEnteringBlock()
[all …]
DProfileInfo.cpp28 template<> char ProfileInfoT<Function,BasicBlock>::ID = 0;
42 ProfileInfoT<Function, BasicBlock>::ProfileInfoT() { in ProfileInfoT()
46 ProfileInfoT<Function, BasicBlock>::~ProfileInfoT() { in ~ProfileInfoT()
54 const double ProfileInfoT<Function,BasicBlock>::MissingValue = -1;
60 ProfileInfoT<Function,BasicBlock>::getExecutionCount(const BasicBlock *BB) { in getExecutionCount()
80 std::set<const BasicBlock*> ProcessedPreds; in getExecutionCount()
83 const BasicBlock *P = *PI; in getExecutionCount()
105 std::set<const BasicBlock*> ProcessedSuccs; in getExecutionCount()
138 double ProfileInfoT<Function,BasicBlock>::getExecutionCount(const Function *F) { in getExecutionCount()
167 void ProfileInfoT<Function,BasicBlock>::
[all …]
/external/llvm/include/llvm/Support/
DCFG.h82 typedef PredIterator<BasicBlock, Value::use_iterator> pred_iterator;
83 typedef PredIterator<const BasicBlock,
86 inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); } in pred_begin()
87 inline const_pred_iterator pred_begin(const BasicBlock *BB) { in pred_begin()
90 inline pred_iterator pred_end(BasicBlock *BB) { return pred_iterator(BB, true);} in pred_end()
91 inline const_pred_iterator pred_end(const BasicBlock *BB) { in pred_end()
222 typedef SuccIterator<TerminatorInst*, BasicBlock> succ_iterator;
224 const BasicBlock> succ_const_iterator;
226 inline succ_iterator succ_begin(BasicBlock *BB) { in succ_begin()
229 inline succ_const_iterator succ_begin(const BasicBlock *BB) { in succ_begin()
[all …]
DPredIteratorCache.h29 DenseMap<BasicBlock*, BasicBlock**> BlockToPredsMap;
30 DenseMap<BasicBlock*, unsigned> BlockToPredCountMap;
42 BasicBlock **GetPreds(BasicBlock *BB) { in GetPreds()
43 BasicBlock **&Entry = BlockToPredsMap[BB]; in GetPreds()
46 SmallVector<BasicBlock*, 32> PredCache(pred_begin(BB), pred_end(BB)); in GetPreds()
51 Entry = Memory.Allocate<BasicBlock*>(PredCache.size()); in GetPreds()
56 unsigned GetNumPreds(BasicBlock *BB) { in GetNumPreds()
/external/javassist/src/main/javassist/bytecode/stackmap/
DBasicBlock.java28 public class BasicBlock { class
31 public BasicBlock[] exit; // null if the block is a leaf.
35 protected BasicBlock(int pos) { in BasicBlock() method in BasicBlock
41 public static BasicBlock find(BasicBlock[] blocks, int pos) in find()
55 BasicBlock body;
57 Catch(BasicBlock b, int i, Catch c) { in Catch()
97 BasicBlock block;
98 BasicBlock[] jump;
121 void setJump(BasicBlock[] bb, int s, boolean always) {
132 protected BasicBlock makeBlock(int pos) {
[all …]
/external/llvm/lib/Transforms/Scalar/
DJumpThreading.cpp51 typedef SmallVectorImpl<std::pair<Constant*, BasicBlock*> > PredValueInfo;
52 typedef SmallVector<std::pair<Constant*, BasicBlock*>, 8> PredValueInfoTy;
82 SmallPtrSet<BasicBlock*, 16> LoopHeaders;
84 SmallSet<AssertingVH<BasicBlock>, 16> LoopHeaders;
86 DenseSet<std::pair<Value*, BasicBlock*> > RecursionSet;
90 DenseSet<std::pair<Value*, BasicBlock*> > &TheSet;
91 std::pair<Value*, BasicBlock*> ThePair;
93 RecursionSetRemover(DenseSet<std::pair<Value*, BasicBlock*> > &S, in RecursionSetRemover()
94 std::pair<Value*, BasicBlock*> P) in RecursionSetRemover()
116 bool ProcessBlock(BasicBlock *BB);
[all …]
DLoopDeletion.cpp39 bool IsLoopDead(Loop* L, SmallVector<BasicBlock*, 4>& exitingBlocks,
40 SmallVector<BasicBlock*, 4>& exitBlocks,
41 bool &Changed, BasicBlock *Preheader);
78 SmallVector<BasicBlock*, 4>& exitingBlocks, in IsLoopDead() argument
79 SmallVector<BasicBlock*, 4>& exitBlocks, in IsLoopDead()
80 bool &Changed, BasicBlock *Preheader) { in IsLoopDead()
81 BasicBlock* exitBlock = exitBlocks[0]; in IsLoopDead()
88 BasicBlock::iterator BI = exitBlock->begin(); in IsLoopDead()
114 for (BasicBlock::iterator BI = (*LI)->begin(), BE = (*LI)->end(); in IsLoopDead()
133 BasicBlock* preheader = L->getLoopPreheader(); in runOnLoop()
[all …]

12345678910>>...14