Home
last modified time | relevance | path

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

12345678910>>...22

/external/v8/src/compiler/
Dschedule.h17 class BasicBlock; variable
22 typedef ZoneVector<BasicBlock*> BasicBlockVector;
29 class BasicBlock final : public ZoneObject {
57 BasicBlock(Zone* zone, Id id);
65 BasicBlock* PredecessorAt(size_t index) { return predecessors_[index]; } in PredecessorAt()
67 void AddPredecessor(BasicBlock* predecessor);
73 BasicBlock* SuccessorAt(size_t index) { return successors_[index]; } in SuccessorAt()
75 void AddSuccessor(BasicBlock* successor);
119 BasicBlock* dominator() const { return dominator_; } in dominator()
120 void set_dominator(BasicBlock* dominator) { dominator_ = dominator; } in set_dominator()
[all …]
Dschedule.cc15 BasicBlock::BasicBlock(Zone* zone, Id id) in BasicBlock() function in v8::internal::compiler::BasicBlock
33 bool BasicBlock::LoopContains(BasicBlock* block) const { in LoopContains()
43 void BasicBlock::AddSuccessor(BasicBlock* successor) { in AddSuccessor()
48 void BasicBlock::AddPredecessor(BasicBlock* predecessor) { in AddPredecessor()
53 void BasicBlock::AddNode(Node* node) { nodes_.push_back(node); } in AddNode()
56 void BasicBlock::set_control(Control control) { in set_control()
61 void BasicBlock::set_control_input(Node* control_input) { in set_control_input()
66 void BasicBlock::set_loop_depth(int32_t loop_depth) { in set_loop_depth()
71 void BasicBlock::set_rpo_number(int32_t rpo_number) { in set_rpo_number()
76 void BasicBlock::set_loop_end(BasicBlock* loop_end) { loop_end_ = loop_end; } in set_loop_end()
[all …]
/external/llvm/include/llvm/IR/
DBasicBlock.h34 struct SymbolTableListSentinelTraits<BasicBlock>
35 : public ilist_half_embedded_sentinel_traits<BasicBlock> {};
52 class BasicBlock : public Value, // Basic blocks are data objects also
53 public ilist_node_with_parent<BasicBlock, Function> {
63 friend class SymbolTableListTraits<BasicBlock>;
65 BasicBlock(const BasicBlock &) = delete;
66 void operator=(const BasicBlock &) = delete;
73 explicit BasicBlock(LLVMContext &C, const Twine &Name = "",
75 BasicBlock *InsertBefore = nullptr);
91 static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "",
[all …]
DCFG.h85 typedef PredIterator<BasicBlock, Value::user_iterator> pred_iterator;
86 typedef PredIterator<const BasicBlock,
91 inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); } in pred_begin()
92 inline const_pred_iterator pred_begin(const BasicBlock *BB) { in pred_begin()
95 inline pred_iterator pred_end(BasicBlock *BB) { return pred_iterator(BB, true);} in pred_end()
96 inline const_pred_iterator pred_end(const BasicBlock *BB) { in pred_end()
99 inline bool pred_empty(const BasicBlock *BB) { in pred_empty()
102 inline pred_range predecessors(BasicBlock *BB) { in predecessors()
105 inline pred_const_range predecessors(const BasicBlock *BB) { in predecessors()
113 typedef TerminatorInst::SuccIterator<TerminatorInst *, BasicBlock>
[all …]
DPredIteratorCache.h30 DenseMap<BasicBlock *, BasicBlock **> BlockToPredsMap;
31 DenseMap<BasicBlock *, unsigned> BlockToPredCountMap;
43 BasicBlock **GetPreds(BasicBlock *BB) { in GetPreds()
44 BasicBlock **&Entry = BlockToPredsMap[BB]; in GetPreds()
48 SmallVector<BasicBlock *, 32> PredCache(pred_begin(BB), pred_end(BB)); in GetPreds()
53 Entry = Memory.Allocate<BasicBlock *>(PredCache.size()); in GetPreds()
58 unsigned GetNumPreds(BasicBlock *BB) { in GetNumPreds()
64 size_t size(BasicBlock *BB) { return GetNumPreds(BB); } in size()
65 ArrayRef<BasicBlock *> get(BasicBlock *BB) { in get()
DDominators.h39 extern template class DomTreeNodeBase<BasicBlock>;
40 extern template class DominatorTreeBase<BasicBlock>;
42 extern template void Calculate<Function, BasicBlock *>(
43 DominatorTreeBase<GraphTraits<BasicBlock *>::NodeType> &DT, Function &F);
44 extern template void Calculate<Function, Inverse<BasicBlock *>>(
45 DominatorTreeBase<GraphTraits<Inverse<BasicBlock *>>::NodeType> &DT,
48 typedef DomTreeNodeBase<BasicBlock> DomTreeNode;
51 const BasicBlock *Start;
52 const BasicBlock *End;
54 BasicBlockEdge(const BasicBlock *Start_, const BasicBlock *End_) : in BasicBlockEdge()
[all …]
/external/llvm/lib/IR/
DBasicBlock.cpp27 ValueSymbolTable *BasicBlock::getValueSymbolTable() { in getValueSymbolTable()
33 LLVMContext &BasicBlock::getContext() const { in getContext()
41 BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent, in BasicBlock() function in BasicBlock
42 BasicBlock *InsertBefore) in BasicBlock()
54 void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) { in insertInto()
64 BasicBlock::~BasicBlock() { in ~BasicBlock()
88 void BasicBlock::setParent(Function *parent) { in setParent()
93 void BasicBlock::removeFromParent() { in removeFromParent()
97 iplist<BasicBlock>::iterator BasicBlock::eraseFromParent() { in eraseFromParent()
103 void BasicBlock::moveBefore(BasicBlock *MovePos) { in moveBefore()
[all …]
/external/llvm/include/llvm/Analysis/
DBranchProbabilityInfo.h55 BranchProbability getEdgeProbability(const BasicBlock *Src,
61 BranchProbability getEdgeProbability(const BasicBlock *Src,
62 const BasicBlock *Dst) const;
64 BranchProbability getEdgeProbability(const BasicBlock *Src,
71 bool isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const;
77 BasicBlock *getHotSucc(BasicBlock *BB) const;
84 raw_ostream &printEdgeProbability(raw_ostream &OS, const BasicBlock *Src,
85 const BasicBlock *Dst) const;
93 uint32_t getEdgeWeight(const BasicBlock *Src,
100 uint32_t getEdgeWeight(const BasicBlock *Src, const BasicBlock *Dst) const;
[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()
77 inline const BasicBlock *findNearestCommonDominator(const BasicBlock *A, in findNearestCommonDominator()
78 const BasicBlock *B) { in findNearestCommonDominator()
[all …]
DLoopIterator.h41 typedef std::vector<BasicBlock*>::const_iterator POIterator;
42 typedef std::vector<BasicBlock*>::const_reverse_iterator RPOIterator;
52 DenseMap<BasicBlock*, unsigned> PostNumbers;
53 std::vector<BasicBlock*> PostBlocks;
84 bool hasPreorder(BasicBlock *BB) const { return PostNumbers.count(BB); } in hasPreorder()
87 bool hasPostorder(BasicBlock *BB) const { in hasPostorder()
88 DenseMap<BasicBlock*, unsigned>::const_iterator I = PostNumbers.find(BB); in hasPostorder()
93 unsigned getPostorder(BasicBlock *BB) const { in getPostorder()
94 DenseMap<BasicBlock*, unsigned>::const_iterator I = PostNumbers.find(BB); in getPostorder()
101 unsigned getRPO(BasicBlock *BB) const { in getRPO()
[all …]
DIteratedDominanceFrontier.h34 class BasicBlock; variable
36 typedef DomTreeNodeBase<BasicBlock> DomTreeNode;
50 IDFCalculator(DominatorTreeBase<BasicBlock> &DT) : DT(DT), useLiveIn(false) {} in IDFCalculator()
57 void setDefiningBlocks(const SmallPtrSetImpl<BasicBlock *> &Blocks) { in setDefiningBlocks()
67 void setLiveInBlocks(const SmallPtrSetImpl<BasicBlock *> &Blocks) { in setLiveInBlocks()
85 void calculate(SmallVectorImpl<BasicBlock *> &IDFBlocks);
88 DominatorTreeBase<BasicBlock> &DT;
91 const SmallPtrSetImpl<BasicBlock *> *LiveInBlocks;
92 const SmallPtrSetImpl<BasicBlock *> *DefBlocks;
93 SmallVector<BasicBlock *, 32> PHIBlocks;
/external/llvm/include/llvm/Transforms/Utils/
DBasicBlockUtils.h36 void DeleteDeadBlock(BasicBlock *BB);
42 void FoldSingleEntryPHINodes(BasicBlock *BB,
50 bool DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI = nullptr);
54 bool MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT = nullptr,
61 void ReplaceInstWithValue(BasicBlock::InstListType &BIL,
62 BasicBlock::iterator &BI, Value *V);
69 void ReplaceInstWithInst(BasicBlock::InstListType &BIL,
70 BasicBlock::iterator &BI, Instruction *I);
128 BasicBlock *SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum,
132 inline BasicBlock *
[all …]
/external/llvm/lib/Analysis/
DCFG.cpp28 SmallVectorImpl<std::pair<const BasicBlock*,const BasicBlock*> > &Result) { in FindFunctionBackedges() argument
29 const BasicBlock *BB = &F.getEntryBlock(); in FindFunctionBackedges()
33 SmallPtrSet<const BasicBlock*, 8> Visited; in FindFunctionBackedges()
34 SmallVector<std::pair<const BasicBlock*, succ_const_iterator>, 8> VisitStack; in FindFunctionBackedges()
35 SmallPtrSet<const BasicBlock*, 8> InStack; in FindFunctionBackedges()
41 std::pair<const BasicBlock*, succ_const_iterator> &Top = VisitStack.back(); in FindFunctionBackedges()
42 const BasicBlock *ParentBB = Top.first; in FindFunctionBackedges()
72 unsigned llvm::GetSuccessorNumber(const BasicBlock *BB, in GetSuccessorNumber()
73 const BasicBlock *Succ) { in GetSuccessorNumber()
93 const BasicBlock *Dest = TI->getSuccessor(SuccNum); in isCriticalEdge()
[all …]
/external/v8/test/unittests/compiler/
Dschedule-unittest.cc21 BasicBlock b(zone(), BasicBlock::Id::FromInt(id)); in TEST_F()
31 BasicBlock b(zone(), BasicBlock::Id::FromInt(0)); in TEST_F()
32 EXPECT_EQ(&b, BasicBlock::GetCommonDominator(&b, &b)); in TEST_F()
37 BasicBlock b0(zone(), BasicBlock::Id::FromInt(0)); in TEST_F()
38 BasicBlock b1(zone(), BasicBlock::Id::FromInt(1)); in TEST_F()
39 BasicBlock b2(zone(), BasicBlock::Id::FromInt(2)); in TEST_F()
45 EXPECT_EQ(&b0, BasicBlock::GetCommonDominator(&b0, &b1)); in TEST_F()
46 EXPECT_EQ(&b0, BasicBlock::GetCommonDominator(&b0, &b2)); in TEST_F()
47 EXPECT_EQ(&b0, BasicBlock::GetCommonDominator(&b1, &b0)); in TEST_F()
48 EXPECT_EQ(&b0, BasicBlock::GetCommonDominator(&b2, &b0)); in TEST_F()
[all …]
Dscheduler-rpo-unittest.cc33 void CheckLoop(BasicBlockVector* order, BasicBlock** blocks, int body_size) { in CheckLoop()
34 BasicBlock* header = blocks[0]; in CheckLoop()
35 BasicBlock* end = header->loop_end(); in CheckLoop()
55 BasicBlock** nodes;
56 BasicBlock* header() { return nodes[0]; } in header()
57 BasicBlock* last() { return nodes[count - 1]; } in last()
64 loop->nodes = new BasicBlock*[count]; in CreateLoop()
97 BasicBlock* last = schedule.start(); in TEST_F()
99 BasicBlock* block = schedule.NewBasicBlock(); in TEST_F()
108 BasicBlock* block = schedule.GetBlockById(BasicBlock::Id::FromSize(i)); in TEST_F()
[all …]
/external/llvm/lib/Transforms/Utils/
DFlattenCFG.cpp31 bool FlattenParallelAndOr(BasicBlock *BB, IRBuilder<> &Builder);
35 bool MergeIfRegion(BasicBlock *BB, IRBuilder<> &Builder);
41 bool CompareIfRegionBlock(BasicBlock *Head1, BasicBlock *Head2,
42 BasicBlock *Block1, BasicBlock *Block2);
46 bool run(BasicBlock *BB);
124 bool FlattenCFGOpt::FlattenParallelAndOr(BasicBlock *BB, IRBuilder<> &Builder) { in FlattenParallelAndOr()
129 BasicBlock *LastCondBlock = nullptr; in FlattenParallelAndOr()
130 BasicBlock *FirstCondBlock = nullptr; in FlattenParallelAndOr()
131 BasicBlock *UnCondBlock = nullptr; in FlattenParallelAndOr()
135 SmallPtrSet<BasicBlock *, 16> Preds(pred_begin(BB), pred_end(BB)); in FlattenParallelAndOr()
[all …]
DBasicBlockUtils.cpp36 void llvm::DeleteDeadBlock(BasicBlock *BB) { in DeleteDeadBlock()
44 for (BasicBlock *Succ : BBTerm->successors()) in DeleteDeadBlock()
68 void llvm::FoldSingleEntryPHINodes(BasicBlock *BB, in FoldSingleEntryPHINodes()
90 bool llvm::DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI) { in DeleteDeadPHIs()
94 for (BasicBlock::iterator I = BB->begin(); in DeleteDeadPHIs()
108 bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT, in MergeBlockIntoPredecessor()
115 BasicBlock *PredBB = BB->getUniquePredecessor(); in MergeBlockIntoPredecessor()
125 BasicBlock *OnlySucc = BB; in MergeBlockIntoPredecessor()
136 for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) { in MergeBlockIntoPredecessor()
189 void llvm::ReplaceInstWithValue(BasicBlock::InstListType &BIL, in ReplaceInstWithValue()
[all …]
DLowerSwitch.cpp71 BasicBlock* BB;
73 CaseRange(ConstantInt *low, ConstantInt *high, BasicBlock *bb) in CaseRange()
80 void processSwitchInst(SwitchInst *SI, SmallPtrSetImpl<BasicBlock*> &DeleteList);
82 BasicBlock *switchConvert(CaseItr Begin, CaseItr End,
84 Value *Val, BasicBlock *Predecessor,
85 BasicBlock *OrigBlock, BasicBlock *Default,
87 BasicBlock *newLeafBlock(CaseRange &Leaf, Value *Val, BasicBlock *OrigBlock,
88 BasicBlock *Default);
118 SmallPtrSet<BasicBlock*, 8> DeleteList; in runOnFunction()
121 BasicBlock *Cur = &*I++; // Advance over block so we don't traverse new blocks in runOnFunction()
[all …]
DLoopSimplify.cpp80 static void placeSplitBlockCarefully(BasicBlock *NewBB, in placeSplitBlockCarefully()
81 SmallVectorImpl<BasicBlock *> &SplitPreds, in placeSplitBlockCarefully()
96 BasicBlock *FoundBB = nullptr; in placeSplitBlockCarefully()
117 BasicBlock *llvm::InsertPreheaderForLoop(Loop *L, DominatorTree *DT, in InsertPreheaderForLoop()
119 BasicBlock *Header = L->getHeader(); in InsertPreheaderForLoop()
122 SmallVector<BasicBlock*, 8> OutsideBlocks; in InsertPreheaderForLoop()
125 BasicBlock *P = *PI; in InsertPreheaderForLoop()
138 BasicBlock *PreheaderBB; in InsertPreheaderForLoop()
158 static BasicBlock *rewriteLoopExitBlock(Loop *L, BasicBlock *Exit, in rewriteLoopExitBlock()
161 SmallVector<BasicBlock*, 8> LoopBlocks; in rewriteLoopExitBlock()
[all …]
DCloneFunction.cpp39 BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, in CloneBasicBlock()
43 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "", F); in CloneBasicBlock()
49 for (BasicBlock::const_iterator II = BB->begin(), IE = BB->end(); in CloneBasicBlock()
128 const BasicBlock &BB = *BI; in CloneFunctionInto()
131 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo); in CloneFunctionInto()
144 const_cast<BasicBlock*>(&BB)); in CloneFunctionInto()
156 cast<BasicBlock>(VMap[&OldFunc->front()])->getIterator(), in CloneFunctionInto()
293 void CloneBlock(const BasicBlock *BB,
294 BasicBlock::const_iterator StartingInst,
295 std::vector<const BasicBlock*> &ToClone);
[all …]
/external/llvm/lib/Transforms/Scalar/
DStructurizeCFG.cpp33 typedef std::pair<BasicBlock *, Value *> BBValuePair;
36 typedef SmallVector<BasicBlock*, 8> BBVector;
40 typedef SmallPtrSet<BasicBlock *, 8> BBSet;
43 typedef MapVector<BasicBlock *, BBVector> BB2BBVecMap;
46 typedef DenseMap<BasicBlock *, PhiMap> BBPhiMap;
47 typedef DenseMap<BasicBlock *, Value *> BBPredicates;
48 typedef DenseMap<BasicBlock *, BBPredicates> PredMap;
49 typedef DenseMap<BasicBlock *, BasicBlock*> BB2BBMap;
64 BasicBlock *Result;
76 void addBlock(BasicBlock *BB, bool Remember = true) { in addBlock()
[all …]
DMergedLoadStoreMotion.cpp135 BasicBlock *getDiamondTail(BasicBlock *BB);
136 bool isDiamondHead(BasicBlock *BB);
141 LoadInst *canHoistFromBlock(BasicBlock *BB, LoadInst *LI);
142 void hoistInstruction(BasicBlock *BB, Instruction *HoistCand,
145 bool hoistLoad(BasicBlock *BB, LoadInst *HoistCand, LoadInst *ElseInst);
146 bool mergeLoads(BasicBlock *BB);
148 StoreInst *canSinkFromBlock(BasicBlock *BB, StoreInst *SI);
149 PHINode *getPHIOperand(BasicBlock *BB, StoreInst *S0, StoreInst *S1);
152 bool sinkStore(BasicBlock *BB, StoreInst *SinkCand, StoreInst *ElseInst);
153 bool mergeStores(BasicBlock *BB);
[all …]
/external/mesa3d/src/gallium/drivers/nv50/codegen/
Dnv50_ir_bb.cpp67 delete reinterpret_cast<BasicBlock *>(BBs.get()); in ~Function()
70 BasicBlock::BasicBlock(Function *fn) : cfg(this), dom(this), func(fn) in BasicBlock() function in nv50_ir::BasicBlock
85 BasicBlock::~BasicBlock() in ~BasicBlock()
90 BasicBlock *
91 BasicBlock::clone(ClonePolicy<Function>& pol) const in clone()
93 BasicBlock *bb = new BasicBlock(pol.context()); in clone()
103 BasicBlock *obb = BasicBlock::get(it.getNode()); in clone()
110 BasicBlock *
111 BasicBlock::idom() const in idom()
114 return dn ? BasicBlock::get(dn) : NULL; in idom()
[all …]
/external/clang/lib/Analysis/
DThreadSafetyTIL.cpp56 unsigned BasicBlock::addPredecessor(BasicBlock *Pred) { in addPredecessor()
70 void BasicBlock::reservePredecessors(unsigned NumPreds) { in reservePredecessors()
155 int BasicBlock::renumberInstrs(int ID) { in renumberInstrs()
168 int BasicBlock::topologicalSort(SimpleArray<BasicBlock*>& Blocks, int ID) { in topologicalSort()
191 int BasicBlock::topologicalFinalSort(SimpleArray<BasicBlock*>& Blocks, int ID) { in topologicalFinalSort()
209 void BasicBlock::computeDominator() { in computeDominator()
210 BasicBlock *Candidate = nullptr; in computeDominator()
236 void BasicBlock::computePostDominator() { in computePostDominator()
237 BasicBlock *Candidate = nullptr; in computePostDominator()
269 static inline void computeNodeSize(BasicBlock *B, in computeNodeSize()
[all …]
/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 …]

12345678910>>...22