Home
last modified time | relevance | path

Searched full:block (Results 1 – 25 of 781) sorted by relevance

12345678910>>...32

/arkcompiler/runtime_core/compiler/optimizer/analysis/
Ddominators_tree.h46 static void SetDomPair(BasicBlock *dominator, BasicBlock *block);
52 * The ancestor of 'block', nullptr for the tree root
54 void SetAncestor(BasicBlock *dest, BasicBlock *block) in SetAncestor() argument
56 (*ancestors_)[GetBlockId(dest)] = block; in SetAncestor()
58 BasicBlock *GetAncestor(BasicBlock *block) const in GetAncestor() argument
60 return (*ancestors_)[GetBlockId(block)]; in GetAncestor()
64 * A set of blocks whose semidominator is 'block'
66 BlocksVector &GetBucket(BasicBlock *block) in GetBucket() argument
68 return (*buckets_)[GetBlockId(block)]; in GetBucket()
72 * The immediate dominator of 'block'
[all …]
Ddominators_tree.cpp25 for (auto block : GetGraph()->GetBlocksRPO()) { in RunImpl() local
26 block->ClearDominatedBlocks(); in RunImpl()
27 block->ClearDominator(); in RunImpl()
33 …SERT_PRINT(dfs_blocks == (GetGraph()->GetBlocksRPO().size() - 1), "There is an unreachable block"); in RunImpl()
47 * Update dominator information for 'block'
49 void DominatorsTree::AdjustImmediateDominators(BasicBlock *block) in AdjustImmediateDominators() argument
51 ASSERT(block != nullptr); in AdjustImmediateDominators()
53 if (GetIdom(block) != GetVertex(GetSemi(block))) { in AdjustImmediateDominators()
54 SetIdom(block, GetIdom(GetIdom(block))); in AdjustImmediateDominators()
56 SetDomPair(GetIdom(block), block); in AdjustImmediateDominators()
[all …]
Dloop_analyzer.cpp38 for (auto block : GetGraph()->GetVectorBlocks()) { in ResetLoopInfo() local
39 if (block != nullptr) { in ResetLoopInfo()
40 block->SetLoop(nullptr); in ResetLoopInfo()
77 * When a block is visited for the first time it is marked with a gray marker,
78 * after visiting all his successors, a block is marked with a black marker.
79 * While doing DFS, if we encounter a block with a gray mark, then edge to this block is back edge.
81 void LoopAnalyzer::BackEdgeSearch(BasicBlock *block) in BackEdgeSearch() argument
83 block->SetMarker(gray_marker_); in BackEdgeSearch()
84 block->SetMarker(black_marker_); in BackEdgeSearch()
85 for (auto succ : block->GetSuccsBlocks()) { in BackEdgeSearch()
[all …]
Dliveness_analyzer.cpp75 * - all dominators of a block are visiting before this block;
93 ASSERT_PRINT(CheckLinearOrder(), "Linear block order isn't correct"); in BuildBlocksLinearOrder()
100 * Check if all forward edges of loop header were visited to get the resulting block order in RPO.
103 bool LivenessAnalyzer::AllForwardEdgesVisited(BasicBlock *block) in AllForwardEdgesVisited() argument
105 if (!block->IsLoopHeader()) { in AllForwardEdgesVisited()
106 for (auto pred : block->GetPredsBlocks()) { in AllForwardEdgesVisited()
113 if (block->GetLoop()->IsIrreducible()) { in AllForwardEdgesVisited()
117 for (auto pred : block->GetPredsBlocks()) { in AllForwardEdgesVisited()
118 if (!block->IsDominate(pred) && !pred->IsMarked(marker_)) { in AllForwardEdgesVisited()
140 // Each block is inserted into pending list before all already inserted blocks in LinearizeBlocks()
[all …]
Dlinear_order.cpp48 void LinearOrder::HandlePrevInstruction(BasicBlock *block, BasicBlock *prev_block) in HandlePrevInstruction() argument
50 ASSERT(block != nullptr && prev_block != nullptr); in HandlePrevInstruction()
58 HandleIfBlock(prev_block, block); in HandlePrevInstruction()
63 … if (block != prev_block->GetSuccessor(0) && !prev_block->GetLastInst()->IsControlFlow()) { in HandlePrevInstruction()
68 } else if (!prev_block->IsEndBlock() && block != prev_block->GetSuccessor(0) && in HandlePrevInstruction()
106 for (auto block : blocks) { in MakeLinearOrder() local
108 HandlePrevInstruction(block, prev); in MakeLinearOrder()
110 linear_blocks_.push_back(block); in MakeLinearOrder()
111 prev = block; in MakeLinearOrder()
115 // Handle last block in MakeLinearOrder()
[all …]
/arkcompiler/runtime_core/static_core/compiler/optimizer/analysis/
Ddominators_tree.h44 static void SetDomPair(BasicBlock *dominator, BasicBlock *block);
50 * The ancestor of 'block', nullptr for the tree root
52 void SetAncestor(BasicBlock *dest, BasicBlock *block) in SetAncestor() argument
54 (*ancestors_)[GetBlockId(dest)] = block; in SetAncestor()
56 BasicBlock *GetAncestor(BasicBlock *block) const in GetAncestor() argument
58 return (*ancestors_)[GetBlockId(block)]; in GetAncestor()
62 * A set of blocks whose semidominator is 'block'
64 BlocksVector &GetBucket(BasicBlock *block) in GetBucket() argument
66 return (*buckets_)[GetBlockId(block)]; in GetBucket()
70 * The immediate dominator of 'block'
[all …]
Ddominators_tree.cpp26 for (auto block : GetGraph()->GetBlocksRPO()) { in RunImpl() local
27 block->ClearDominatedBlocks(); in RunImpl()
28 block->ClearDominator(); in RunImpl()
34 …SSERT_PRINT(dfsBlocks == (GetGraph()->GetBlocksRPO().size() - 1), "There is an unreachable block"); in RunImpl()
48 * Update dominator information for 'block'
50 void DominatorsTree::AdjustImmediateDominators(BasicBlock *block) in AdjustImmediateDominators() argument
52 ASSERT(block != nullptr); in AdjustImmediateDominators()
54 if (GetIdom(block) != GetVertex(GetSemi(block))) { in AdjustImmediateDominators()
55 SetIdom(block, GetIdom(GetIdom(block))); in AdjustImmediateDominators()
57 SetDomPair(GetIdom(block), block); in AdjustImmediateDominators()
[all …]
Dlinear_order.cpp56 void LinearOrder::HandlePrevInstruction(BasicBlock *block, BasicBlock *prevBlock) in HandlePrevInstruction() argument
58 ASSERT(block != nullptr && prevBlock != nullptr); in HandlePrevInstruction()
68 HandleIfBlock(prevBlock, block); in HandlePrevInstruction()
82 … if (block != prevBlock->GetSuccessor(0) && !prevBlock->GetLastInst()->IsControlFlow()) { in HandlePrevInstruction()
87 } else if (!prevBlock->IsEndBlock() && block != prevBlock->GetSuccessor(0) && in HandlePrevInstruction()
125 for (auto block : blocks) { in MakeLinearOrder() local
127 HandlePrevInstruction(block, prev); in MakeLinearOrder()
129 linearBlocks_.push_back(block); in MakeLinearOrder()
130 prev = block; in MakeLinearOrder()
134 // Handle last block in MakeLinearOrder()
[all …]
Dloop_analyzer.cpp39 for (auto block : GetGraph()->GetVectorBlocks()) { in ResetLoopInfo() local
40 if (block != nullptr) { in ResetLoopInfo()
41 block->SetLoop(nullptr); in ResetLoopInfo()
42 block->SetNextLoop(nullptr); in ResetLoopInfo()
77 * When a block is visited for the first time it is marked with a gray marker,
78 * after visiting all his successors, a block is marked with a black marker.
79 * While doing DFS, if we encounter a block with a gray mark, then edge to this block is back edge.
81 void LoopAnalyzer::BackEdgeSearch(BasicBlock *block) in BackEdgeSearch() argument
83 block->SetMarker(grayMarker_); in BackEdgeSearch()
84 block->SetMarker(blackMarker_); in BackEdgeSearch()
[all …]
Dlinear_order.h28 …* For each `If` block place its false-successor in the next position of the `linear_blocks_` vecto…
30 …* - marks `If` block with `JumpFlag` (so `Codegen` could insert `jmp`) if there are no `If` succes…
59 void HandlePrevInstruction(BasicBlock *block, BasicBlock *prevBlock);
66 BasicBlock *LeastLikelySuccessor(const BasicBlock *block);
67 BasicBlock *LeastLikelySuccessorByBranchCounter(const BasicBlock *block);
68 BasicBlock *LeastLikelySuccessorByPreference(const BasicBlock *block);
71 int64_t GetBranchCounter(const BasicBlock *block, bool trueSucc);
72 bool IsConditionChainCounter(const BasicBlock *block);
73 int64_t GetConditionChainCounter(const BasicBlock *block, bool trueSucc);
74 int64_t GetConditionChainTrueSuccessorCounter(const BasicBlock *block);
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir/
Dgraph.cpp24 static void MarkBlocksRec(Marker mrk, BasicBlock *block) in MarkBlocksRec() argument
26 if (block->SetMarker(mrk)) { in MarkBlocksRec()
29 for (auto succ : block->GetSuccsBlocks()) { in MarkBlocksRec()
108 void Graph::AddBlock(BasicBlock *block) in AddBlock() argument
110 block->SetId(vector_bb_.size()); in AddBlock()
111 vector_bb_.push_back(block); in AddBlock()
112 block->SetGraph(this); in AddBlock()
117 void Graph::AddBlock(BasicBlock *block, uint32_t id) in AddBlock() argument
120 // (id + 1) for adding a block with index 0 in AddBlock()
124 block->SetId(id); in AddBlock()
[all …]
Dgraph_checker.cpp37 for (auto block : graph->GetVectorBlocks()) { in UserInputCheck() local
38 if (block == nullptr) { in UserInputCheck()
41 for (auto inst : block->AllInsts()) { in UserInputCheck()
96 for (auto block : GetGraph()->GetVectorBlocks()) { in Check() local
98 if (block == nullptr) { in Check()
101 ASSERT_PRINT(block->GetGraph() == GetGraph(), "Block linked to incorrect graph"); in Check()
102 … ASSERT_PRINT(block->GetId() == blocks_id, "Block ID must be equal to its ID in graph vector"); in Check()
103 CheckBlock(block); in Check()
106 ASSERT_PRINT(blocks_count == GetGraph()->GetBlocksRPO().size(), "There is disconnected block"); in Check()
131 void GraphChecker::CheckBlock([[maybe_unused]] BasicBlock *block) in CheckBlock() argument
[all …]
Dgraph_cloner.h69 BasicBlock *CloneLoopHeader(BasicBlock *block, BasicBlock *outer, BasicBlock *replaceable_pred);
84 * \--->[outside-block]
103 * | [resolver-block]<----/
106 * \--->[outside-block]
123 * \--->[outside-block]
177 …void BuildClonedLoopHeaderDataFlow(const BasicBlock &block, BasicBlock *resolver, BasicBlock *clon…
180 bool HasClone(const BasicBlock *block) in HasClone() argument
182 … return (block->GetId() < clone_blocks_.size()) && (clone_blocks_[block->GetId()] != nullptr); in HasClone()
185 BasicBlock *GetClone(const BasicBlock *block) in GetClone() argument
187 ASSERT(block != nullptr); in GetClone()
[all …]
/arkcompiler/runtime_core/static_core/compiler/optimizer/ir/
Dgraph.cpp35 static void MarkBlocksRec(Marker mrk, BasicBlock *block) in MarkBlocksRec() argument
37 if (block->SetMarker(mrk)) { in MarkBlocksRec()
40 for (auto succ : block->GetSuccsBlocks()) { in MarkBlocksRec()
80 COMPILER_LOG(DEBUG, CLEANUP) << "Erase unreachable block " << bb->GetId(); in RemoveUnreachableBlocks()
156 void Graph::AddBlock(BasicBlock *block) in AddBlock() argument
158 block->SetId(vectorBb_.size()); in AddBlock()
159 vectorBb_.push_back(block); in AddBlock()
160 block->SetGraph(this); in AddBlock()
165 void Graph::AddBlock(BasicBlock *block, uint32_t id) in AddBlock() argument
168 // (id + 1) for adding a block with index 0 in AddBlock()
[all …]
Dgraph_cloner.h80 BasicBlock *CloneLoopHeader(BasicBlock *block, BasicBlock *outer, BasicBlock *replaceablePred);
94 * \--->[outside-block]
113 * | [resolver-block]<----/
116 * \--->[outside-block]
133 * \--->[outside-block]
175 BasicBlock *GetClone(const BasicBlock *block) in GetClone() argument
177 ASSERT(block != nullptr); in GetClone()
178 … ASSERT_PRINT(block->GetGraph() == GetGraph(), "GraphCloner probably caught disconnected block"); in GetClone()
179 ASSERT_DO(HasClone(block), block->Dump(&std::cerr)); in GetClone()
180 return cloneBlocks_[block->GetId()]; in GetClone()
[all …]
Dbasicblock.h104 // Get index of the given block in predecessor container
105 PANDA_PUBLIC_API size_t GetPredBlockIndex(const BasicBlock *block) const;
106 // Get index of the given block in successor container
107 PANDA_PUBLIC_API size_t GetSuccBlockIndex(const BasicBlock *block) const;
108 // Get basic block by its index in predecessors container
123 …* Split block after the given instruction. Current block will contain instructions before the spli…
124 * the created block - after.
125 * @param inst instruction after which block will be split
126 * @param make_edge whether to make control flow edge from first block to the second one
127 * @return return created basic block
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/compiler/optimizer/optimizations/interop_js/
Dinterop_intrinsic_optimization.cpp92 InteropIntrinsicOptimization::BlockInfo &InteropIntrinsicOptimization::GetInfo(BasicBlock *block) in GetInfo() argument
94 return blockInfo_[block->GetId()]; in GetInfo()
97 void InteropIntrinsicOptimization::MergeScopesInsideBlock(BasicBlock *block) in MergeScopesInsideBlock() argument
104 for (auto *inst : block->InstsSafe()) { in MergeScopesInsideBlock()
115 … << *lastStart << "\nfrom BB " << block->GetId(); in MergeScopesInsideBlock()
116 block->RemoveInst(lastEnd); in MergeScopesInsideBlock()
117 block->RemoveInst(lastStart); in MergeScopesInsideBlock()
243 for (auto *block : loop->GetBlocks()) { in FindForbiddenLoops() local
244 for (auto *inst : block->Insts()) { in FindForbiddenLoops()
274 bool InteropIntrinsicOptimization::IsForbiddenLoopEntry(BasicBlock *block) in IsForbiddenLoopEntry() argument
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/13.compilation_units_packages_and_modules/11.top-level_statements/
Dblock_declaration.params.yaml16 - block: '["hello", "world"]'
17 - block: 'let i: int = 1;'
18 - block: |-
21 - block: 'class Point {}'
22 - block: 'interface A {}'
23 - block: 'enum Enum { v1, v2 }'
24 - block: 'const b: int = 1;'
25 - block: 'function Dist(x: int, y: int): void {}'
26 - block: |-
30 - block: |-
[all …]
/arkcompiler/runtime_core/static_core/compiler/tests/
Diterators_test.cpp26 void CheckInstForwardIterator(BasicBlock *block, std::vector<Inst *> &result) in CheckInstForwardIterator() argument
29 for (auto inst : block->PhiInsts()) { in CheckInstForwardIterator()
35 for (auto inst : block->Insts()) { in CheckInstForwardIterator()
41 for (auto inst : block->AllInsts()) { in CheckInstForwardIterator()
47 void CheckInstForwardValidIterator(BasicBlock *block, std::vector<Inst *> &result) in CheckInstForwardValidIterator() argument
50 for (auto inst : block->PhiInstsSafe()) { in CheckInstForwardValidIterator()
56 for (auto inst : block->InstsSafe()) { in CheckInstForwardValidIterator()
62 for (auto inst : block->AllInstsSafe()) { in CheckInstForwardValidIterator()
68 void CheckInstBackwardValidIterator(BasicBlock *block, std::vector<Inst *> &result) in CheckInstBackwardValidIterator() argument
71 for (auto inst : block->PhiInstsSafeReverse()) { in CheckInstBackwardValidIterator()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/
D8_statements.rst23 .. code-block:: abnf
27 | block
81 .. code-block:: abnf
99 Block chapter
107 forms a *block*:
109 .. code-block:: abnf
111 block:
115 The execution of a block means that all block statements, except type
117 appearance within the block until exception (see :ref:`Exceptions`), error
120 If a block is the body of a ``functionDeclaration`` (see
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/snippet_verifier/
DREADME.md35 - partN - The code block is the N part of the overall snippet
40 .. code-block-meta:
46 .. code-block:: typescript
55 The parameters of the snippet should be declared immediately before the code block in .rst file.
59 .. code-block-meta:
63 .. code-block-meta:
68 .. code-block-meta:
73 - #### blank code-block-meta
74 **Every snippet in .rst should be marked with ".. code-block-meta:"**, but there is cases when snip…
75 In case all snippet's options are default, you can simply write ".. code-block-meta:" without any a…
[all …]
/arkcompiler/runtime_core/compiler/tests/
Diterators_test.cpp28 auto block = &BB(0); in Check() local
29 PopulateBlock(block, tested_instructions); in Check()
34 for (auto inst : block->PhiInsts()) { in Check()
40 for (auto inst : block->Insts()) { in Check()
46 for (auto inst : block->AllInsts()) { in Check()
53 for (auto inst : block->PhiInstsSafe()) { in Check()
59 for (auto inst : block->InstsSafe()) { in Check()
65 for (auto inst : block->AllInstsSafe()) { in Check()
72 for (auto inst : block->PhiInstsSafeReverse()) { in Check()
79 for (auto inst : block->InstsSafeReverse()) { in Check()
[all …]
/arkcompiler/runtime_core/static_core/compiler/docs/
Descape_analysis.md17 Escape analysis assigns a state to each basic block (BasicBlockState) that binds an object state to…
26block its state is evaluated using states of predecessing blocks. If there is only one block then …
32 * set of phi instructions that should be inserted into each block;
52 for each basic block:
53 if block is a loop header:
54 ProcessLoop(block)
56 MergePredecessorsState(block)
57 for each inst from the block:
61 MergePredecessorsState(block):
66 for each ref-typed instruction inst from block's live ins:
[all …]
/arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/
Ddeoptimize_elimination.cpp41 auto block = inst->GetBasicBlock(); in ReplaceDeoptimizeIfByUnconditionalDeoptimize() local
42 if (block != nullptr) { in ReplaceDeoptimizeIfByUnconditionalDeoptimize()
43 block->ReplaceInstByDeoptimize(inst); in ReplaceDeoptimizeIfByUnconditionalDeoptimize()
53 auto block = inst->GetBasicBlock(); in VisitDeoptimizeIf() local
54 auto graph = block->GetGraph(); in VisitDeoptimizeIf()
70 !(graph->IsOsrMode() && block->GetLoop() != userInst->GetBasicBlock()->GetLoop()) && in VisitDeoptimizeIf()
96 * Run search recursively from current block to start block. in CanRemoveGuard()
112 bool DeoptimizeElimination::CanRemoveGuardRec(BasicBlock *block, Inst *guard, const Marker &mrk, in CanRemoveGuardRec() argument
115 if (block->IsStartBlock()) { in CanRemoveGuardRec()
118 auto blockType = GetBlockType(block); in CanRemoveGuardRec()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/optimizations/
Dbranch_elimination.cpp39 for (auto block : GetGraph()->GetBlocksRPO()) { in RunImpl() local
40 if (block->IsEmpty() || (block->IsTry() && GetGraph()->IsBytecodeOptimizer())) { in RunImpl()
43 if (block->GetLastInst()->GetOpcode() == Opcode::IfImm) { in RunImpl()
44 VisitBlock(block); in RunImpl()
63 COMPILER_LOG(DEBUG, BRANCH_ELIM) << "Block with constant if instruction input is visited, id = " in BranchEliminationConst()
92 …COMPILER_LOG(DEBUG, BRANCH_ELIM) << "Block with intrinsic ldtrue/ldfalse if instruction input is v… in BranchEliminationIntrinsic()
141 * @param if_block - block with constant 'if' instruction input
168 * Before disconnecting the `block` find and disconnect all its successors dominated by it.
170 * @param block - unreachable block to disconnect from the graph
172 void BranchElimination::MarkUnreachableBlocks(BasicBlock *block) in MarkUnreachableBlocks() argument
[all …]

12345678910>>...32