Home
last modified time | relevance | path

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

12345678910>>...36

/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 …]
/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 …]
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/ets_frontend/ets2panda/test/parser/js/
Dtest-class-static-block-expected.txt15 "program": "test-class-static-block.js"
20 "program": "test-class-static-block.js"
36 "program": "test-class-static-block.js"
41 "program": "test-class-static-block.js"
65 "program": "test-class-static-block.js"
70 "program": "test-class-static-block.js"
78 "program": "test-class-static-block.js"
83 "program": "test-class-static-block.js"
91 "program": "test-class-static-block.js"
96 "program": "test-class-static-block.js"
[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 ASSERT(block != nullptr); in AddBlock()
159 block->SetId(vectorBb_.size()); in AddBlock()
160 vectorBb_.push_back(block); in AddBlock()
161 block->SetGraph(this); in AddBlock()
166 void Graph::AddBlock(BasicBlock *block, uint32_t id) in AddBlock() argument
[all …]
Dgraph_cloner.h80 BasicBlock *CloneLoopHeader(BasicBlock *block, BasicBlock *outer, BasicBlock *replaceablePred);
94 * \--->[outside-block]
113 * | [resolver-block]<----/
116 * \--->[outside-block]
133 * \--->[outside-block]
177 BasicBlock *GetClone(const BasicBlock *block) in GetClone() argument
179 ASSERT(block != nullptr); in GetClone()
180 … ASSERT_PRINT(block->GetGraph() == GetGraph(), "GraphCloner probably caught disconnected block"); in GetClone()
181 ASSERT_DO(HasClone(block), block->Dump(&std::cerr)); in GetClone()
182 return cloneBlocks_[block->GetId()]; in GetClone()
[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/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/ets_frontend/ets2panda/linter/arkanalyzer/src/core/graph/
DBasicBlock.ts24 * - ID: a **number** that uniquely identify the basic block, initialized as -1.
25 * - Statements: an **array** of statements in the basic block.
26 …* - Predecessors: an **array** of basic blocks in front of the current basic block. More accurate…
27 * blocks can reach the current block through edges.
28 …s: an **array** of basic blocks after the current basic block. More accurately, the current block
49 * Returns an array of the statements in a basic block.
50 * @returns An array of statements in a basic block.
61 * Adds the given stmt at the beginning of the basic block.
73 * Adds the given stmt at the end of the basic block.
85 * Inserts toInsert in the basic block after point.
[all …]
DCfg.ts42 for (const block of this.blocks) { constant
43 block.getStmts().forEach(s => stmts.push(s));
49 * Inserts toInsert in the basic block in CFG after point.
55 const block = this.stmtToBlock.get(point); constant
56 if (!block) {
60 this.updateStmt2BlockMap(block, toInsert);
61 return block.insertAfter(toInsert, point);
65 * Inserts toInsert in the basic block in CFG befor point.
71 const block = this.stmtToBlock.get(point); constant
72 if (!block) {
[all …]
DDominanceFinder.ts28 let block = this.blocks[i];
29 this.blockToIdx.set(block, i);
33 // calculate immediate dominator for each block
42 for (const block of this.blocks) { constant
43 if (block === startingBlock) {
46 let blockIdx = this.blockToIdx.get(block) as number;
47 let preds = Array.from(block.getPredecessors());
63 // calculate dominance frontiers for each block
68 for (const block of this.blocks) {
69 let preds = Array.from(block.getPredecessors());
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/13.compilation_units/10.top-level_statements/
Dblock_declaration.params.yaml16 - block: '["hello", "world"]'
17 - block: 'let i: int = 1;'
18 - block: |-
21 - block: 'enum Enum { v1, v2 }'
22 - block: 'const b: int = 1;'
23 - block: |-
27 - block: |-
31 - block: |-
35 - block: |-
39 - block: |-
[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/plugins/ets/doc/spec/
D8_statements.rst25 .. code-block:: abnf
29 | block
82 .. code-block:: abnf
100 Block chapter
107 forms a *block*.
109 The syntax of *block statement* is presented below:
111 .. code-block:: abnf
113 block:
117 The execution of a block means that all block statements, except type
119 appearance within the block while an error is thrown (see :ref:`Errors`), or
[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>>...36