Home
last modified time | relevance | path

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

123

/arkcompiler/runtime_core/compiler/optimizer/analysis/
Ddominators_tree.h23 class BasicBlock; variable
31 using BlocksVector = ArenaVector<BasicBlock *>;
46 static void SetDomPair(BasicBlock *dominator, BasicBlock *block);
48 …void UpdateAfterResolverInsertion(BasicBlock *predecessor, BasicBlock *successor, BasicBlock *reso…
54 void SetAncestor(BasicBlock *dest, BasicBlock *block) in SetAncestor()
58 BasicBlock *GetAncestor(BasicBlock *block) const in GetAncestor()
66 BlocksVector &GetBucket(BasicBlock *block) in GetBucket()
74 void SetIdom(BasicBlock *dest, BasicBlock *block) in SetIdom()
78 BasicBlock *GetIdom(BasicBlock *block) const in GetIdom()
86 void SetLabel(BasicBlock *dest, BasicBlock *block) in SetLabel()
[all …]
Dlinear_order.h24 class BasicBlock; variable
44 ArenaVector<BasicBlock *> &GetBlocks() in GetBlocks()
49 const ArenaVector<BasicBlock *> &GetBlocks() const in GetBlocks()
59 void HandlePrevInstruction(BasicBlock *block, BasicBlock *prev_block);
60 void HandleIfBlock(BasicBlock *if_true_block, BasicBlock *next_block);
65 BasicBlock *LeastLikelySuccessor(const BasicBlock *block);
68 void DFSAndDeferLeastFrequentBranches(BasicBlock *block, size_t *blocks_count);
70 ArenaVector<BasicBlock *> linear_blocks_;
71 ArenaList<BasicBlock *> rpo_blocks_;
72 ArenaVector<BasicBlock *> reordered_blocks_;
Dloop_analyzer.h23 class BasicBlock; variable
28 Loop(ArenaAllocator *allocator, BasicBlock *header, uint32_t id) in Loop()
49 BasicBlock *GetHeader() const in GetHeader()
53 void SetPreHeader(BasicBlock *pre_header) in SetPreHeader()
58 BasicBlock *GetPreHeader() const in GetPreHeader()
62 void AppendBackEdge(BasicBlock *block) in AppendBackEdge()
68 void ReplaceBackEdge(BasicBlock *block, BasicBlock *new_block) in ReplaceBackEdge()
78 bool HasBackEdge(BasicBlock *block) const in HasBackEdge()
84 void RemoveBackEdge(BasicBlock *block) in RemoveBackEdge()
95 const ArenaVector<BasicBlock *> &GetBackEdges() const in GetBackEdges()
[all …]
Drpo.h25 class BasicBlock; variable
48 void RemoveBasicBlock(BasicBlock *rm_block) in RemoveBasicBlock()
57 void AddBasicBlockAfter(BasicBlock *cur_block, BasicBlock *new_block) in AddBasicBlockAfter()
64 void AddBasicBlockBefore(BasicBlock *cur_block, BasicBlock *new_block) in AddBasicBlockBefore()
71 void AddVectorAfter(BasicBlock *cur_block, const ArenaVector<BasicBlock *> &new_vector) in AddVectorAfter()
78 const ArenaVector<BasicBlock *> &GetBlocks() const in GetBlocks()
86 void DFS(BasicBlock *block, size_t *blocks_count);
90 ArenaVector<BasicBlock *> rpo_vector_;
Ddominators_tree.cpp50 void DominatorsTree::AdjustImmediateDominators(BasicBlock *block) in AdjustImmediateDominators()
65 void DominatorsTree::ComputeImmediateDominators(BasicBlock *block) in ComputeImmediateDominators()
97 void DominatorsTree::Compress(BasicBlock *block) in Compress()
114 void DominatorsTree::DfsNumbering(BasicBlock *block) in DfsNumbering()
138 BasicBlock *DominatorsTree::Eval(BasicBlock *block) in Eval()
181 void DominatorsTree::SetDomPair(BasicBlock *dominator, BasicBlock *block) in SetDomPair()
190 static bool IsPathBetweenBlocks(BasicBlock *start_block, BasicBlock *target_block, BasicBlock *excl… in IsPathBetweenBlocks()
197 …d DominatorsTree::UpdateAfterResolverInsertion(BasicBlock *predecessor, BasicBlock *successor, Bas… in UpdateAfterResolverInsertion()
222 inline uint32_t DominatorsTree::GetBlockId(BasicBlock *block) in GetBlockId()
Dlinear_order.cpp29 void LinearOrder::HandleIfBlock(BasicBlock *if_true_block, BasicBlock *next_block) in HandleIfBlock()
48 void LinearOrder::HandlePrevInstruction(BasicBlock *block, BasicBlock *prev_block) in HandlePrevInstruction()
75 static void AddSortedByPc(ArenaList<BasicBlock *> *rpo_blocks, BasicBlock *bb) in AddSortedByPc()
77 …auto cmp = [](BasicBlock *lhs, BasicBlock *rhs) { return lhs->GetGuestPc() >= rhs->GetGuestPc(); }; in AddSortedByPc()
105 BasicBlock *prev = nullptr; in MakeLinearOrder()
121 BasicBlock *LinearOrder::LeastLikelySuccessor(const BasicBlock *block) in LeastLikelySuccessor()
152 void LinearOrder::DFSAndDeferLeastFrequentBranches(BasicBlock *block, size_t *blocks_count) in DFSAndDeferLeastFrequentBranches()
Dloop_analyzer.cpp50 Loop *LoopAnalyzer::CreateNewLoop(BasicBlock *loop_header) in CreateNewLoop()
80 void LoopAnalyzer::BackEdgeSearch(BasicBlock *block) in BackEdgeSearch()
99 void LoopAnalyzer::ProcessNewBackEdge(BasicBlock *header, BasicBlock *back_edge) in ProcessNewBackEdge()
116 ArenaVector<int> LoopAnalyzer::GetForwardEdgesIndexes(BasicBlock *header) in GetForwardEdgesIndexes()
137 void LoopAnalyzer::MovePhiInputsToPreHeader(BasicBlock *header, BasicBlock *pre_header, in MovePhiInputsToPreHeader()
153 void LoopAnalyzer::UpdateControlFlowWithPreHeader(BasicBlock *header, BasicBlock *pre_header, in UpdateControlFlowWithPreHeader()
179 BasicBlock *LoopAnalyzer::CreatePreHeader(BasicBlock *header) in CreatePreHeader()
211 BasicBlock *pre_header = nullptr; in FindAndInsertPreHeaders()
276 void LoopAnalyzer::NaturalLoopSearch(Loop *loop, BasicBlock *block) in NaturalLoopSearch()
310 void Loop::AppendBlock(BasicBlock *block) in AppendBlock()
[all …]
Dliveness_analyzer.h28 class BasicBlock; variable
464 const ArenaVector<BasicBlock *> &GetLinearizedBlocks() const in GetLinearizedBlocks()
475 BasicBlock *GetBlockCoversPoint(LifeNumber ln) const in GetBlockCoversPoint()
501 LiveRange GetBlockLiveRange(const BasicBlock *block) const;
553 bool AllForwardEdgesVisited(BasicBlock *block);
564 void ProcessBlockLiveInstructions(BasicBlock *block, InstLiveSet *live_set);
568 InstLiveSet *GetInitInstLiveSet(BasicBlock *block);
571 void SetBlockLiveRange(BasicBlock *block, LiveRange life_range);
572 void SetBlockLiveSet(BasicBlock *block, InstLiveSet *live_set);
573 InstLiveSet *GetBlockLiveSet(BasicBlock *block) const;
[all …]
/arkcompiler/runtime_core/libark_defect_scan_aux/include/
Dgraph.h26 class BasicBlock; variable
47 BasicBlock GetBasicBlock() const;
61 class BasicBlock {
63 explicit BasicBlock(const compiler::BasicBlock *bb) : bb_(bb) {} in BasicBlock() function
64 ~BasicBlock() = default;
66 bool operator==(const BasicBlock &bb) const;
67 bool operator!=(const BasicBlock &bb) const;
69 std::vector<BasicBlock> GetPredBlocks() const;
70 std::vector<BasicBlock> GetSuccBlocks() const;
74 const compiler::BasicBlock *bb_ {nullptr};
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir/
Dgraph_cloner.h25 class BasicBlock; variable
49 BasicBlock *header {nullptr};
50 BasicBlock *backedge {nullptr};
51 BasicBlock *exit_block {nullptr};
52 BasicBlock *outer {nullptr};
53 ArenaVector<BasicBlock *> *blocks {nullptr};
59 BasicBlock *outer {nullptr};
60 BasicBlock *header {nullptr};
61 BasicBlock *pre_header {nullptr};
62 ArenaVector<BasicBlock *> *blocks {nullptr};
[all …]
Dgraph_checker.h55 void CheckBlock(BasicBlock *block);
60 void CheckControlFlow(BasicBlock *block);
61 void CheckDataFlow(BasicBlock *block);
63 void CheckInstsRegisters(BasicBlock *block);
64 void CheckPhisRegisters(BasicBlock *block);
65 void CheckNoLowLevel(BasicBlock *block);
75 bool CheckBlockHasPredecessor(BasicBlock *block, BasicBlock *predecessor);
76 bool CheckBlockHasSuccessor(BasicBlock *block, BasicBlock *successor);
78 void CheckBlockEdges(const BasicBlock &block);
79 void CheckTryBeginBlock(const BasicBlock &block);
[all …]
Dbasicblock.cpp24 BasicBlock::BasicBlock(Graph *graph, uint32_t guest_pc) in BasicBlock() function in panda::compiler::BasicBlock
33 bool BasicBlock::IsStartBlock() const in IsStartBlock()
37 bool BasicBlock::IsEndBlock() const in IsEndBlock()
41 bool BasicBlock::IsPseudoControlFlowBlock() const in IsPseudoControlFlowBlock()
46 bool BasicBlock::IsLoopHeader() const in IsLoopHeader()
52 BasicBlock *BasicBlock::SplitBlockAfterInstruction(Inst *inst, bool make_edge) in SplitBlockAfterInstruction()
83 void BasicBlock::AddSucc(BasicBlock *succ, bool can_add_empty_block) in AddSucc()
97 void BasicBlock::ReplaceSucc(const BasicBlock *prev_succ, BasicBlock *new_succ, bool can_add_empty_… in ReplaceSucc()
111 BasicBlock *BasicBlock::InsertNewBlockToSuccEdge(BasicBlock *succ) in InsertNewBlockToSuccEdge()
119 BasicBlock *BasicBlock::InsertEmptyBlockBefore() in InsertEmptyBlockBefore()
[all …]
Dbasicblock.h61 class BasicBlock : public MarkerSet { // , public ArenaObject<ARENA_ALLOC_BASIC_BLOCK>
63 explicit BasicBlock(Graph *graph, uint32_t guest_pc = INVALID_PC);
75 ArenaVector<BasicBlock *> &GetPredsBlocks() in GetPredsBlocks()
79 const ArenaVector<BasicBlock *> &GetPredsBlocks() const in GetPredsBlocks()
84 ArenaVector<BasicBlock *> &GetSuccsBlocks() in GetSuccsBlocks()
88 const ArenaVector<BasicBlock *> &GetSuccsBlocks() const in GetSuccsBlocks()
93 BasicBlock *GetSuccessor(size_t index) const in GetSuccessor()
99 BasicBlock *GetPredecessor(size_t index) const in GetPredecessor()
124 BasicBlock *GetTrueSuccessor() const in GetTrueSuccessor()
130 BasicBlock *GetFalseSuccessor() const in GetFalseSuccessor()
[all …]
Dgraph.cpp25 static void MarkBlocksRec(Marker mrk, BasicBlock *block) in MarkBlocksRec()
109 void Graph::AddBlock(BasicBlock *block) in AddBlock()
118 void Graph::AddBlock(BasicBlock *block, uint32_t id) in AddBlock()
131 const ArenaVector<BasicBlock *> &Graph::GetBlocksRPO() const in GetBlocksRPO()
136 const ArenaVector<BasicBlock *> &Graph::GetBlocksLinearOrder() const in GetBlocksLinearOrder()
151 BasicBlock *Graph::CreateEmptyBlock(uint32_t guest_pc) in CreateEmptyBlock()
153 auto block = GetAllocator()->New<BasicBlock>(this, guest_pc); in CreateEmptyBlock()
159 BasicBlock *Graph::CreateEmptyBlock(BasicBlock *base_block) in CreateEmptyBlock()
170 BasicBlock *Graph::CreateEmptyBlock(uint32_t id, uint32_t guest_pc) in CreateEmptyBlock()
172 auto block = GetAllocator()->New<BasicBlock>(this, guest_pc); in CreateEmptyBlock()
[all …]
Dgraph.h33 class BasicBlock; variable
186 void AddBlock(BasicBlock *block);
188 void AddBlock(BasicBlock *block, uint32_t id);
190 void DisconnectBlock(BasicBlock *block, bool remove_last_inst = true, bool fix_dom_tree = true);
191 …void DisconnectBlockRec(BasicBlock *block, bool remove_last_inst = true, bool fix_dom_tree = true);
193 void EraseBlock(BasicBlock *block);
194 void RestoreBlock(BasicBlock *block);
196 void RemoveEmptyBlock(BasicBlock *block);
199 void RemoveEmptyBlockWithPhis(BasicBlock *block, bool irr_loop = false);
202 void RemovePredecessors(BasicBlock *block, bool remove_last_inst = true);
[all …]
Dgraph_visitor.h63 virtual const ArenaVector<BasicBlock *> &GetBlocksToVisit() const = 0;
67 virtual void VisitBlock(BasicBlock *bb) = 0;
/arkcompiler/runtime_core/libark_defect_scan_aux/
Dgraph.cpp79 BasicBlock Inst::GetBasicBlock() const in GetBasicBlock()
81 return BasicBlock(inst_->GetBasicBlock()); in GetBasicBlock()
131 bool BasicBlock::operator==(const BasicBlock &bb) const in operator ==()
136 bool BasicBlock::operator!=(const BasicBlock &bb) const in operator !=()
141 Graph BasicBlock::GetGraph() const in GetGraph()
146 std::vector<BasicBlock> BasicBlock::GetPredBlocks() const in GetPredBlocks()
148 std::vector<BasicBlock> pred_blocks; in GetPredBlocks()
155 std::vector<BasicBlock> BasicBlock::GetSuccBlocks() const in GetSuccBlocks()
157 std::vector<BasicBlock> succ_blocks; in GetSuccBlocks()
164 std::vector<Inst> BasicBlock::GetInstList() const in GetInstList()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/optimizations/
Dtry_catch_resolving.h40 BasicBlock *TryFindResolvedCatchHandler(BasicBlock *try_begin, BasicBlock *try_end);
41 void DeleteTryCatchEdges(BasicBlock *try_begin, BasicBlock *try_end);
42 void ConnectCatchHandlerAfterThrow(BasicBlock *try_end, BasicBlock *catch_block);
43 void RemoveCatchPhis(BasicBlock *block, Inst *throw_inst);
45 bool DFS(BasicBlock *block, Marker marker, uint32_t try_id);
Dcleanup.h57 …bool RunOnce(ArenaSet<BasicBlock *> *empty_blocks, ArenaSet<BasicBlock *> *new_empty_blocks, bool …
58 void RemoveDeadPhi(BasicBlock *bb, ArenaSet<BasicBlock *> *new_empty_blocks);
59 bool ProcessBB(BasicBlock *bb, Marker dead_mrk, ArenaSet<BasicBlock *> *new_empty_blocks);
60 bool CheckSpecialTriangle(BasicBlock *bb);
63 bool Dce(Marker dead_mrk, ArenaSet<BasicBlock *> *new_empty_blocks);
67 bool SimpleDce(Marker dead_mrk, ArenaSet<BasicBlock *> *new_empty_blocks);
69 bool Removal(ArenaSet<BasicBlock *> *new_empty_blocks);
74 ArenaSet<BasicBlock *> empty1_;
75 ArenaSet<BasicBlock *> empty2_;
76 ArenaVector<BasicBlock *> saved_preds_;
Dmove_constants.h45 ArenaUnorderedMap<uint32_t, ArenaVector<BasicBlock *>> user_dominators_cache_;
46 ArenaVector<const ArenaVector<BasicBlock *> *> user_dominating_blocks_;
51 BasicBlock *FindCommonDominator();
52 const ArenaVector<BasicBlock *> *GetDominators(const User &user);
Dmove_constants.cpp47 bool IsBlockSuitable(const BasicBlock *bb) in IsBlockSuitable()
56 BasicBlock *target_bb = nullptr; in MoveFromStartBlock()
117 const ArenaVector<BasicBlock *> *MoveConstants::GetDominators(const User &user) in GetDominators()
130 ArenaVector<BasicBlock *> dominators(GetGraph()->GetLocalAllocator()->Adapter()); in GetDominators()
133 auto first_dominator = const_cast<BasicBlock *>(inst->GetBasicBlock()); in GetDominators()
146 BasicBlock *MoveConstants::FindCommonDominator() in FindCommonDominator()
150 BasicBlock *common_dominator {}; in FindCommonDominator()
153 BasicBlock *common_dominator_candidate {}; in FindCommonDominator()
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/
Dir_builder.h47BasicBlock *begin_bb {nullptr}; // NOLINT(misc-non-private-member-variables-in…
48BasicBlock *end_bb {nullptr}; // NOLINT(misc-non-private-member-variables-in…
50 …ArenaVector<BasicBlock *> *basic_blocks {nullptr}; // NOLINT(misc-non-private-member-variables-in…
108 BasicBlock *GetBlockForPc(size_t pc) in GetBlockForPc()
113 BasicBlock *GetPrevBlockForPc(size_t pc) in GetPrevBlockForPc()
124 … bool BuildBasicBlock(BasicBlock *bb, InstBuilder *inst_builder, const uint8_t *instructions_buf);
125 …bool BuildInstructionsForBB(BasicBlock *bb, InstBuilder *inst_builder, const uint8_t *instructions…
133 BasicBlock *GetBlockToJump(BytecodeInstruction *inst, size_t pc);
134 BasicBlock *GetBlockForSaveStateDeoptimize(BasicBlock *block);
138 …void ConnectTryCodeBlock(const TryCodeBlock &try_block, const ArenaMap<uint32_t, BasicBlock *> &ca…
[all …]
/arkcompiler/runtime_core/bytecode_optimizer/
Dcodegen.h32 using compiler::BasicBlock;
92 void EmitJump(const BasicBlock *bb);
99 const ArenaVector<BasicBlock *> &GetBlocksToVisit() const override in GetBlocksToVisit()
133 … AppendCatchBlock(uint32_t type_id, const compiler::BasicBlock *try_begin, const compiler::BasicBl…
134 … const compiler::BasicBlock *catch_begin, const compiler::BasicBlock *catch_end = nullptr);
135 void VisitTryBegin(const compiler::BasicBlock *bb);
/arkcompiler/runtime_core/compiler/optimizer/optimizations/regalloc/
Dsplit_resolver.h37 void ProcessBlock(BasicBlock *block);
39 SpillFillInst *CreateSpillFillForSplitMove(BasicBlock *source_block);
40 …void ConnectSpiltFromPredBlock(BasicBlock *src_bb, LifeIntervals *src_interval, BasicBlock *target…
Dsplit_resolver.cpp69 void SplitResolver::ProcessBlock(BasicBlock *block) in ProcessBlock()
105 void SplitResolver::ConnectSpiltFromPredBlock(BasicBlock *src_bb, LifeIntervals *src_interval, Basi… in ConnectSpiltFromPredBlock()
108 BasicBlock *resolver {nullptr}; in ConnectSpiltFromPredBlock()
143 SpillFillInst *SplitResolver::CreateSpillFillForSplitMove(BasicBlock *source_block) in CreateSpillFillForSplitMove()

123