Home
last modified time | relevance | path

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

12345678910>>...26

/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.cpp26 for (auto block : GetGraph()->GetBlocksRPO()) { in RunImpl() local
27 block->ClearDominatedBlocks(); in RunImpl()
28 block->ClearDominator(); in RunImpl()
34 …SERT_PRINT(dfs_blocks == (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 …]
Dloop_analyzer.cpp39 for (auto block : GetGraph()->GetVectorBlocks()) { in ResetLoopInfo() local
40 if (block != nullptr) { in ResetLoopInfo()
41 block->SetLoop(nullptr); in ResetLoopInfo()
76 * When a block is visited for the first time it is marked with a gray marker,
77 * after visiting all his successors, a block is marked with a black marker.
78 * While doing DFS, if we encounter a block with a gray mark, then edge to this block is back edge.
80 void LoopAnalyzer::BackEdgeSearch(BasicBlock *block) in BackEdgeSearch() argument
82 block->SetMarker(gray_marker_); in BackEdgeSearch()
83 block->SetMarker(black_marker_); in BackEdgeSearch()
84 for (auto succ : block->GetSuccsBlocks()) { in BackEdgeSearch()
[all …]
Dliveness_analyzer.cpp76 * - all dominators of a block are visiting before this block;
94 ASSERT_PRINT(CheckLinearOrder(), "Linear block order isn't correct"); in BuildBlocksLinearOrder()
101 * Check if all forward edges of loop header were visited to get the resulting block order in RPO.
104 bool LivenessAnalyzer::AllForwardEdgesVisited(BasicBlock *block) in AllForwardEdgesVisited() argument
106 if (!block->IsLoopHeader()) { in AllForwardEdgesVisited()
107 for (auto pred : block->GetPredsBlocks()) { in AllForwardEdgesVisited()
114 if (block->GetLoop()->IsIrreducible()) { in AllForwardEdgesVisited()
118 for (auto pred : block->GetPredsBlocks()) { in AllForwardEdgesVisited()
119 if (!block->IsDominate(pred) && !pred->IsMarked(marker_)) { in AllForwardEdgesVisited()
141 // 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()
76 … if (block != prevBlock->GetSuccessor(0) && !prevBlock->GetLastInst()->IsControlFlow()) { in HandlePrevInstruction()
81 } else if (!prevBlock->IsEndBlock() && block != prevBlock->GetSuccessor(0) && in HandlePrevInstruction()
119 for (auto block : blocks) { in MakeLinearOrder() local
121 HandlePrevInstruction(block, prev); in MakeLinearOrder()
123 linearBlocks_.push_back(block); in MakeLinearOrder()
124 prev = block; in MakeLinearOrder()
128 // 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()
76 * When a block is visited for the first time it is marked with a gray marker,
77 * after visiting all his successors, a block is marked with a black marker.
78 * While doing DFS, if we encounter a block with a gray mark, then edge to this block is back edge.
80 void LoopAnalyzer::BackEdgeSearch(BasicBlock *block) in BackEdgeSearch() argument
82 block->SetMarker(grayMarker_); in BackEdgeSearch()
83 block->SetMarker(blackMarker_); in BackEdgeSearch()
84 for (auto succ : block->GetSuccsBlocks()) { 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);
65 BasicBlock *LeastLikelySuccessor(const BasicBlock *block);
66 BasicBlock *LeastLikelySuccessorByBranchCounter(const BasicBlock *block);
67 BasicBlock *LeastLikelySuccessorByPreference(const BasicBlock *block);
70 int64_t GetBranchCounter(const BasicBlock *block, bool trueSucc);
71 bool IsConditionChainCounter(const BasicBlock *block);
72 int64_t GetConditionChainCounter(const BasicBlock *block, bool trueSucc);
73 int64_t GetConditionChainTrueSuccessorCounter(const BasicBlock *block);
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir/
Dgraph.cpp25 static void MarkBlocksRec(Marker mrk, BasicBlock *block) in MarkBlocksRec() argument
27 if (block->SetMarker(mrk)) { in MarkBlocksRec()
30 for (auto succ : block->GetSuccsBlocks()) { in MarkBlocksRec()
109 void Graph::AddBlock(BasicBlock *block) in AddBlock() argument
111 block->SetId(vector_bb_.size()); in AddBlock()
112 vector_bb_.push_back(block); in AddBlock()
113 block->SetGraph(this); in AddBlock()
118 void Graph::AddBlock(BasicBlock *block, uint32_t id) in AddBlock() argument
121 // (id + 1) for adding a block with index 0 in AddBlock()
125 block->SetId(id); in AddBlock()
[all …]
Dgraph_checker.cpp44 for (auto block : graph->GetVectorBlocks()) { in UserInputCheck() local
45 if (block == nullptr) { in UserInputCheck()
48 for (auto inst : block->AllInsts()) { in UserInputCheck()
103 for (auto block : GetGraph()->GetVectorBlocks()) { in Check() local
105 if (block == nullptr) { in Check()
108 ASSERT_PRINT(block->GetGraph() == GetGraph(), "Block linked to incorrect graph"); in Check()
109 … ASSERT_PRINT(block->GetId() == blocks_id, "Block ID must be equal to its ID in graph vector"); in Check()
110 CheckBlock(block); in Check()
113 ASSERT_PRINT(blocks_count == GetGraph()->GetBlocksRPO().size(), "There is disconnected block"); in Check()
138 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]
176 …void BuildClonedLoopHeaderDataFlow(const BasicBlock &block, BasicBlock *resolver, BasicBlock *clon…
179 bool HasClone(const BasicBlock *block) in HasClone() argument
181 … return (block->GetId() < clone_blocks_.size()) && (clone_blocks_[block->GetId()] != nullptr); in HasClone()
184 BasicBlock *GetClone(const BasicBlock *block) in GetClone() argument
186 ASSERT(block != nullptr); in GetClone()
[all …]
Dbasicblock.h136 // Get index of the given block in predecessor container
137 size_t GetPredBlockIndex(const BasicBlock *block) const in GetPredBlockIndex() argument
139 auto it = std::find(preds_.begin(), preds_.end(), block); in GetPredBlockIndex()
141 ASSERT(std::find(it + 1, preds_.end(), block) == preds_.end()); in GetPredBlockIndex()
145 // Get index of the given block in successor container
146 size_t GetSuccBlockIndex(const BasicBlock *block) const in GetSuccBlockIndex() argument
148 auto it = std::find(succs_.begin(), succs_.end(), block); in GetSuccBlockIndex()
150 ASSERT(std::find(it + 1, succs_.end(), block) == succs_.end()); in GetSuccBlockIndex()
154 // Get basic block by its index in predecessors container
188 …* Split block after the given instruction. Current block will contain instructions before the spli…
[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/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.h77 BasicBlock *CloneLoopHeader(BasicBlock *block, BasicBlock *outer, BasicBlock *replaceablePred);
92 * \--->[outside-block]
111 * | [resolver-block]<----/
114 * \--->[outside-block]
131 * \--->[outside-block]
173 BasicBlock *GetClone(const BasicBlock *block) in GetClone() argument
175 ASSERT(block != nullptr); in GetClone()
176 … ASSERT_PRINT(block->GetGraph() == GetGraph(), "GraphCloner probably caught disconnected block"); in GetClone()
177 ASSERT_DO(HasClone(block), block->Dump(&std::cerr)); in GetClone()
178 return cloneBlocks_[block->GetId()]; in GetClone()
[all …]
Dbasicblock.h138 // Get index of the given block in predecessor container
139 size_t GetPredBlockIndex(const BasicBlock *block) const in GetPredBlockIndex() argument
141 auto it = std::find(preds_.begin(), preds_.end(), block); in GetPredBlockIndex()
143 ASSERT(std::find(it + 1, preds_.end(), block) == preds_.end()); in GetPredBlockIndex()
147 // Get index of the given block in successor container
148 size_t GetSuccBlockIndex(const BasicBlock *block) const in GetSuccBlockIndex() argument
150 auto it = std::find(succs_.begin(), succs_.end(), block); in GetSuccBlockIndex()
152 ASSERT(std::find(it + 1, succs_.end(), block) == succs_.end()); in GetSuccBlockIndex()
156 // Get basic block by its index in predecessors container
190 …* Split block after the given instruction. Current block will contain instructions before the spli…
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/src/
Dmuid.cpp70 DECODE(i, result, status.block); in MuidTransform()
79 TRANS(F, a, b, c, d, status.block[0], 0xd76aa478, 7) in MuidTransform()
80 TRANS(F, d, a, b, c, status.block[1], 0xe8c7b756, 12) in MuidTransform()
81 TRANS(F, c, d, a, b, status.block[2], 0x242070db, 17) in MuidTransform()
82 TRANS(F, b, c, d, a, status.block[3], 0xc1bdceee, 22) in MuidTransform()
83 TRANS(F, a, b, c, d, status.block[4], 0xf57c0faf, 7) in MuidTransform()
84 TRANS(F, d, a, b, c, status.block[5], 0x4787c62a, 12) in MuidTransform()
85 TRANS(F, c, d, a, b, status.block[6], 0xa8304613, 17) in MuidTransform()
86 TRANS(F, b, c, d, a, status.block[7], 0xfd469501, 22) in MuidTransform()
87 TRANS(F, a, b, c, d, status.block[8], 0x698098d8, 7) in MuidTransform()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/13.modules_and_compilation_units/07.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.cpp28 auto block = &BB(0U); in Check() local
29 PopulateBlock(block, testedInstructions); 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/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.rst23 .. code-block:: abnf
27 | block
85 .. code-block:: abnf
103 Block chapter
109 A sequence of statements enclosed in balanced braces forms a *block*.
111 .. code-block:: abnf
113 block:
117 The execution of a block means that all block statements, except type
119 appearance within the block if no exception, error, or return occurs.
121 If a block is the body of a *functionDeclaration* or a *classMethodDeclaration*,
[all …]
/arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/
Ddeoptimize_elimination.cpp44 auto block = inst->GetBasicBlock(); in ReplaceDeoptimizeIfByUnconditionalDeoptimize() local
45 if (block != nullptr) { in ReplaceDeoptimizeIfByUnconditionalDeoptimize()
46 block->ReplaceInstByDeoptimize(inst); in ReplaceDeoptimizeIfByUnconditionalDeoptimize()
55 auto block = GetGraph()->GetStartBlock(); in RemoveSafePoints() local
56 ASSERT(block != nullptr && block->IsStartBlock()); in RemoveSafePoints()
57 for (auto sp : block->Insts()) { in RemoveSafePoints()
61 …PILER_LOG(DEBUG, DEOPTIMIZE_ELIM) << "SafePoint " << sp->GetId() << " is deleted from start block"; in RemoveSafePoints()
62block->GetGraph()->GetEventWriter().EventDeoptimizeElimination(GetOpcodeString(sp->GetOpcode()), in RemoveSafePoints()
147 auto block = inst->GetBasicBlock(); in VisitDeoptimizeIf() local
148 auto graph = block->GetGraph(); in VisitDeoptimizeIf()
[all …]

12345678910>>...26