Home
last modified time | relevance | path

Searched refs:block (Results 1 – 25 of 106) sorted by relevance

12345

/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
125 block->SetId(id); in AddBlock()
126 vector_bb_[id] = block; 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()
138 void GraphChecker::CheckBlock([[maybe_unused]] BasicBlock *block) in CheckBlock() argument
141 CheckControlFlow(block); in CheckBlock()
[all …]
Dgraph_cloner.h69 BasicBlock *CloneLoopHeader(BasicBlock *block, BasicBlock *outer, BasicBlock *replaceable_pred);
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()
187 … ASSERT_PRINT(block->GetGraph() == GetGraph(), "GraphCloner probably caught disconnected block"); in GetClone()
188 ASSERT_DO(HasClone(block), block->Dump(&std::cerr)); in GetClone()
189 return clone_blocks_[block->GetId()]; in GetClone()
223 for (const auto &block : blocks) { in CloneBlocksAndInstructions() local
[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 …]
Dgraph_cloner.cpp62 for (auto block : GetGraph()->GetBlocksRPO()) { in CloneAnalyses() local
63 auto clone = GetClone(block); in CloneAnalyses()
64 if (block->GetDominator() != nullptr) { in CloneAnalyses()
65 auto clone_dom = GetClone(block->GetDominator()); in CloneAnalyses()
68 for (auto dom_blocks : block->GetDominatedBlocks()) { in CloneAnalyses()
98 for (auto block : loop->GetBlocks()) { in CopyLoop() local
99 if (block->IsLoopHeader()) { in CopyLoop()
102 cloned_loop->AppendBlock(GetClone(block)); in CopyLoop()
128 for (auto block : GetGraph()->GetBlocksLinearOrder()) { in CloneLinearOrder() local
129 clone_linear_blocks.push_back(GetClone(block)); in CloneLinearOrder()
[all …]
Dbasicblock.h137 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()
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()
229 void InsertBlockBeforeSucc(BasicBlock *block, BasicBlock *succ);
310 void AddDominatedBlock(BasicBlock *block) in AddDominatedBlock() argument
312 dom_blocks_.push_back(block); in AddDominatedBlock()
314 void RemoveDominatedBlock(BasicBlock *block) in RemoveDominatedBlock() argument
[all …]
Ddump.cpp82 ArenaString BBId(const BasicBlock *block, ArenaAllocator *allocator) in BBId() argument
84 if (block != nullptr) { in BBId()
85 return IdToString(static_cast<uint32_t>(block->GetId()), allocator); in BBId()
241 auto block = GetPhiInputBb(idx); in DumpInputs() local
242 …(*out) << (fl_first ? "" : ", ") << InstId(input, allocator) << "(bb" << BBId(block, allocator) <<… in DumpInputs()
454 void BlockProps(const BasicBlock *block, std::ostream *out) in BlockProps() argument
457 if (block->IsStartBlock()) { in BlockProps()
461 if (block->IsEndBlock()) { in BlockProps()
465 if (block->IsLoopValid() && !block->GetLoop()->IsRoot()) { in BlockProps()
466 if (block->IsLoopHeader()) { in BlockProps()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/analysis/
Ddominators_tree.cpp26 for (auto block : GetGraph()->GetBlocksRPO()) { in RunImpl() local
27 block->ClearDominatedBlocks(); in RunImpl()
28 block->ClearDominator(); in RunImpl()
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()
65 void DominatorsTree::ComputeImmediateDominators(BasicBlock *block) in ComputeImmediateDominators() argument
67 ASSERT(block != nullptr); in ComputeImmediateDominators()
[all …]
Ddominators_tree.h46 static void SetDomPair(BasicBlock *dominator, BasicBlock *block);
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()
66 BlocksVector &GetBucket(BasicBlock *block) in GetBucket() argument
68 return (*buckets_)[GetBlockId(block)]; in GetBucket()
74 void SetIdom(BasicBlock *dest, BasicBlock *block) in SetIdom() argument
76 (*idoms_)[GetBlockId(dest)] = block; in SetIdom()
78 BasicBlock *GetIdom(BasicBlock *block) const in GetIdom() argument
[all …]
Dloop_analyzer.cpp39 for (auto block : GetGraph()->GetVectorBlocks()) { in ResetLoopInfo() local
40 if (block != nullptr) { in ResetLoopInfo()
41 block->SetLoop(nullptr); in ResetLoopInfo()
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()
86 ProcessNewBackEdge(succ, block); in BackEdgeSearch()
91 block->ResetMarker(gray_marker_); in BackEdgeSearch()
235 auto block = *it; in PopulateLoops() local
[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()
121 BasicBlock *LinearOrder::LeastLikelySuccessor(const BasicBlock *block) in LeastLikelySuccessor() argument
[all …]
Dliveness_analyzer.cpp104 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()
151 … auto pc_compare = [succ](auto block) { return block->GetGuestPc() > succ->GetGuestPc(); }; in LinearizeBlocks() argument
159 auto is_same_or_inner_loop = [succ](auto block) { in LinearizeBlocks() argument
160 return succ->GetLoop() == block->GetLoop() || block->GetLoop()->IsRoot() || in LinearizeBlocks()
161 succ->GetLoop()->IsInside(block->GetLoop()); in LinearizeBlocks()
[all …]
Dloop_analyzer.h62 void AppendBackEdge(BasicBlock *block) in AppendBackEdge() argument
64 ASSERT(std::find(back_edges_.begin(), back_edges_.end(), block) == back_edges_.end()); in AppendBackEdge()
65 back_edges_.push_back(block); in AppendBackEdge()
68 void ReplaceBackEdge(BasicBlock *block, BasicBlock *new_block) in ReplaceBackEdge() argument
70 ASSERT(block != new_block); in ReplaceBackEdge()
72 auto it = std::find(back_edges_.begin(), back_edges_.end(), block); in ReplaceBackEdge()
74 ASSERT(std::find(it + 1, back_edges_.end(), block) == back_edges_.end()); in ReplaceBackEdge()
78 bool HasBackEdge(BasicBlock *block) const in HasBackEdge() argument
80 auto it = std::find(back_edges_.begin(), back_edges_.end(), block); in HasBackEdge()
84 void RemoveBackEdge(BasicBlock *block) in RemoveBackEdge() argument
[all …]
Drpo.cpp27 void Rpo::DFS(BasicBlock *block, size_t *blocks_count) in DFS() argument
29 ASSERT(block != nullptr); in DFS()
30 block->SetMarker(marker_); in DFS()
32 for (auto succ_block : block->GetSuccsBlocks()) { in DFS()
39 rpo_vector_[--(*blocks_count)] = block; in DFS()
/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 …]
Dcompiler_basicblock_test.cpp305 auto block = graph->GetBlocksRPO()[0]; in __anon9f1e038e0a02() local
306block->InsertRangeBefore(block->GetFirstInst(), block->GetLastInst(), graph->GetFirstConstInst()); in __anon9f1e038e0a02()
307 EXPECT_EQ(block->GetLastInst()->GetNext(), graph->GetFirstConstInst()); in __anon9f1e038e0a02()
333 for (auto block : graph->GetBlocksRPO()) { in __anon9f1e038e0b02() local
334 if (block->IsTry()) { in __anon9f1e038e0b02()
336 Loop loop(graph->GetAllocator(), block, id); in __anon9f1e038e0b02()
339 block->SetLoop(&loop); in __anon9f1e038e0b02()
340 EXPECT_NE(block->GetLoop(), nullptr); in __anon9f1e038e0b02()
341 block->InvalidateLoopIfIrreducible(); in __anon9f1e038e0b02()
343 if (block->IsTryBegin()) { in __anon9f1e038e0b02()
[all …]
/arkcompiler/runtime_core/bytecode_optimizer/
Dreg_acc_alloc.cpp30 compiler::BasicBlock *block = src_inst->GetBasicBlock(); in IsAccWriteBetween() local
38 if (block->GetSuccsBlocks().size() > 1) { in IsAccWriteBetween()
42 ASSERT(block->GetSuccsBlocks().size() == 1); in IsAccWriteBetween()
43 block = block->GetSuccessor(0); in IsAccWriteBetween()
45 if (!dst_inst->IsPhi() && block->GetPredsBlocks().size() > 1) { in IsAccWriteBetween()
48 } while (block->IsEmpty() && !block->HasPhi()); in IsAccWriteBetween()
52 inst = *(block->AllInsts()); in IsAccWriteBetween()
199 for (auto block : GetGraph()->GetBlocksRPO()) { in RunImpl() local
200 for (auto inst : block->Insts()) { in RunImpl()
217 for (auto block : GetGraph()->GetBlocksRPO()) { in RunImpl() local
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_arraybuffer.cpp322 uint8_t *block = reinterpret_cast<uint8_t *>(pointer); in GetValueFromBuffer() local
323 return GetValueFromBuffer(thread, byteIndex, block, type, littleEndian); in GetValueFromBuffer()
326 …Value BuiltinsArrayBuffer::GetValueFromBuffer(JSThread *thread, uint32_t byteIndex, uint8_t *block, in GetValueFromBuffer() argument
332 uint8_t res = block[byteIndex]; // NOLINT in GetValueFromBuffer()
336 uint8_t res = block[byteIndex]; // NOLINT in GetValueFromBuffer()
341 … return GetValueFromBufferForInteger<uint16_t, NumberSize::UINT16>(block, byteIndex, littleEndian); in GetValueFromBuffer()
343 … return GetValueFromBufferForInteger<int16_t, NumberSize::INT16>(block, byteIndex, littleEndian); in GetValueFromBuffer()
345 … return GetValueFromBufferForInteger<uint32_t, NumberSize::UINT32>(block, byteIndex, littleEndian); in GetValueFromBuffer()
347 … return GetValueFromBufferForInteger<int32_t, NumberSize::INT32>(block, byteIndex, littleEndian); in GetValueFromBuffer()
349 …return GetValueFromBufferForFloat<float, UnionType32, NumberSize::FLOAT32>(block, byteIndex, littl… in GetValueFromBuffer()
[all …]
Dbuiltins_arraybuffer.h76 static JSTaggedValue SetValueInBuffer(JSThread* thread, uint32_t byteIndex, uint8_t *block,
78 static JSTaggedValue GetValueFromBuffer(JSThread *thread, uint32_t byteIndex, uint8_t *block,
88 static void SetTypeData(uint8_t *block, T value, uint32_t index);
91 …static JSTaggedValue GetValueFromBufferForInteger(uint8_t *block, uint32_t byteIndex, bool littleE…
94 …static JSTaggedValue GetValueFromBufferForFloat(uint8_t *block, uint32_t byteIndex, bool littleEnd…
96 static JSTaggedValue GetValueFromBufferForBigInt(JSThread *thread, uint8_t *block,
100 static void SetValueInBufferForByte(double val, uint8_t *block, uint32_t byteIndex);
102 static void SetValueInBufferForUint8Clamped(double val, uint8_t *block, uint32_t byteIndex);
105 …static void SetValueInBufferForInteger(double val, uint8_t *block, uint32_t byteIndex, bool little…
108 …static void SetValueInBufferForFloat(double val, uint8_t *block, uint32_t byteIndex, bool littleEn…
[all …]
Dbuiltins_atomics.h67 …static JSTaggedValue HandleWithUint8(JSThread *thread, uint32_t size, uint8_t *block, uint32_t ind…
70 …static JSTaggedValue HandleWithInt8(JSThread *thread, uint32_t size, uint8_t *block, uint32_t inde…
73 …static JSTaggedValue HandleWithUint16(JSThread *thread, uint32_t size, uint8_t *block, uint32_t in…
76 …static JSTaggedValue HandleWithInt16(JSThread *thread, uint32_t size, uint8_t *block, uint32_t ind…
79 …static JSTaggedValue HandleWithUint32(JSThread *thread, uint32_t size, uint8_t *block, uint32_t in…
82 …static JSTaggedValue HandleWithInt32(JSThread *thread, uint32_t size, uint8_t *block, uint32_t ind…
85 …static JSTaggedValue HandleWithBigInt64(JSThread *thread, uint32_t size, uint8_t *block, uint32_t …
88 …static JSTaggedValue HandleWithBigUint64(JSThread *thread, uint32_t size, uint8_t *block, uint32_t…
Dbuiltins_atomics.cpp313 uint8_t *block = reinterpret_cast<uint8_t *>(pointer); in AtomicReadModifyWriteCase() local
317 return HandleWithUint8(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
319 return HandleWithInt8(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
321 return HandleWithUint16(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
323 return HandleWithInt16(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
325 return HandleWithUint32(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
327 return HandleWithInt32(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
329 return HandleWithBigInt64(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
331 return HandleWithBigUint64(thread, size, block, indexedPosition, argv, op); in AtomicReadModifyWriteCase()
340 JSTaggedValue BuiltinsAtomics::HandleWithUint8(JSThread *thread, uint32_t size, uint8_t *block, in HandleWithUint8() argument
[all …]
/arkcompiler/ets_frontend/merge_abc/src/
DassemblyFunctionProto.cpp20 void CatchBlock::Serialize(const panda::pandasm::Function::CatchBlock &block, protoPanda::CatchBloc… in Serialize() argument
22 protoBlock.set_wholeline(block.whole_line); in Serialize()
23 protoBlock.set_exceptionrecord(block.exception_record); in Serialize()
24 protoBlock.set_trybeginlabel(block.try_begin_label); in Serialize()
25 protoBlock.set_tryendlabel(block.try_end_label); in Serialize()
26 protoBlock.set_catchbeginlabel(block.catch_begin_label); in Serialize()
27 protoBlock.set_catchendlabel(block.catch_end_label); in Serialize()
30 …:Deserialize(const protoPanda::CatchBlock &protoBlock, panda::pandasm::Function::CatchBlock &block) in Deserialize() argument
32 block.whole_line = protoBlock.wholeline(); in Deserialize()
33 block.exception_record = protoBlock.exceptionrecord(); in Deserialize()
[all …]
/arkcompiler/ets_runtime/ecmascript/
Dbyte_array.cpp25 auto *block = reinterpret_cast<uint8_t *>(pointer) + offset; in Set() local
26 builtins::BuiltinsArrayBuffer::SetValueInBuffer(thread, idx * GetByteLength(), block, in Set()
33 auto *block = reinterpret_cast<uint8_t *>(pointer) + offset; in Get() local
34 …return builtins::BuiltinsArrayBuffer::GetValueFromBuffer(thread, idx * GetByteLength(), block, typ… in Get()
/arkcompiler/ets_runtime/ecmascript/compiler/
Dtyped_array_stub_builder.cpp212 GateRef block = GetDataPointFromBuffer(buffer); in GetValueFromBuffer() local
213 GateRef re = Load(VariableType::INT8(), block, byteIndex); in GetValueFromBuffer()
221 GateRef block = GetDataPointFromBuffer(buffer); in GetValueFromBuffer() local
222 GateRef re = Load(VariableType::INT8(), block, byteIndex); in GetValueFromBuffer()
230 GateRef block = GetDataPointFromBuffer(buffer); in GetValueFromBuffer() local
231 GateRef re = Load(VariableType::INT8(), block, byteIndex); in GetValueFromBuffer()
248 GateRef block = GetDataPointFromBuffer(buffer); in GetValueFromBuffer() local
249 GateRef re = Load(VariableType::INT16(), block, byteIndex); in GetValueFromBuffer()
257 GateRef block = GetDataPointFromBuffer(buffer); in GetValueFromBuffer() local
258 GateRef re = Load(VariableType::INT16(), block, byteIndex); in GetValueFromBuffer()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/optimizations/regalloc/
Dsplit_resolver.cpp38 for (auto block : liveness_->GetLinearizedBlocks()) { in Run() local
39 ASSERT(block != nullptr); in Run()
40 if (!block->IsEndBlock()) { in Run()
41 ProcessBlock(block); in Run()
69 void SplitResolver::ProcessBlock(BasicBlock *block) in ProcessBlock() argument
71 auto succ_begin = liveness_->GetBlockLiveRange(block).GetBegin(); in ProcessBlock()
85 ConnectSpiltFromPredBlock(input_bb, input_liveness, block, interval); in ProcessBlock()
99 for (auto pred : block->GetPredsBlocks()) { in ProcessBlock()
100 ConnectSpiltFromPredBlock(pred, interval, block, succ_split); in ProcessBlock()

12345