| /arkcompiler/runtime_core/compiler/optimizer/ |
| D | pass_manager_statistics.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 25 : graph_(graph), in PassManagerStatistics() 26 pass_stat_list_(graph->GetAllocator()->Adapter()), in PassManagerStatistics() 27 pass_stat_stack_(graph->GetAllocator()->Adapter()), in PassManagerStatistics() 34 // clang-format off in PrintStatistics() 52 out << "-----------------------------------------------------------------------------\n"; in PrintStatistics() 57 …ID) << std::right << index << space_buf << " " << std::left << std::setw(OFFSET_PASS_NAME - indent) in PrintStatistics() 64 out << "-----------------------------------------------------------------------------\n"; in PrintStatistics() 66 << std::right << std::setw(OFFSET_DEFAULT) << graph_->GetAllocator()->GetAllocatedSize() in PrintStatistics() [all …]
|
| D | pass_manager.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 31 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 43 : graph_(graph), in PassManager() 44 optimizations_(graph->GetAllocator()->Adapter()), in PassManager() 45 … ANALYSES(details::PredefinedAnalyses::Instantiate<Analysis *>(graph_->GetAllocator(), graph_)), in PassManager() 46 stats_((parent_pm == nullptr) ? graph->GetAllocator()->New<PassManagerStatistics>(graph) in PassManager() 47 : parent_pm->GetStatistics()) in PassManager() 54 std::string delimiters = "~`@#$%^&*()-+=\\|/\"<>;,.[]"; in ClearFileName() 58 return str.substr(0, NAME_MAX - suffix.size()); in ClearFileName() [all …]
|
| D | pass.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 27 explicit Pass(Graph *graph) : graph_(graph) {} in Pass() 49 return graph_; in GetGraph() 88 Graph *graph_ {nullptr};
|
| D | pass_manager.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 35 // NOLINTNEXTLINE(fuchsia-multiple-inheritance) 53 ArenaVector<T> vec(allocator->Adapter()); in Instantiate() 55 ((vec.push_back(allocator->New<Types>((std::forward<Args>(args))...))), ...); in Instantiate() 88 auto local_mem_size_before = GetLocalAllocator()->GetAllocatedSize(); in RunPass() 90 // NOLINTNEXTLINE(readability-braces-around-statements) in RunPass() 94 // NOLINTNEXTLINE(readability-misleading-indentation) in RunPass() 96 T pass(graph_, std::forward<Args>(args)...); in RunPass() 102 GetLocalAllocator()->Resize(local_mem_size_before); in RunPass() [all …]
|
| D | pass_manager_statistics.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 85 Graph *graph_;
|
| /arkcompiler/runtime_core/compiler/optimizer/ir_builder/ |
| D | inst_templates.yaml | 1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 15 binop: |- 20 …auto inst = graph_->CreateInst<%= opc %>(<%= get_type(inst.dtype) %>, GetPc(instruction->GetAddres… 21 <%=template('operands', inst, '')-%> 23 binop_z: |- 25 auto inst_save_state = CreateSaveState(Opcode::SaveState, GetPc(instruction->GetAddress())); 26 …auto inst_check = graph_->CreateInstZeroCheck(<%= get_type(inst.dtype) %>, GetPc(instruction->GetA… 28 if (graph_->IsBytecodeOptimizer()) { 29 …inst_check->SetInput(0, FindOrCreate32BitConstant(instruction->GetImm<<%= inst.get_format %>, 0>()… [all …]
|
| D | phi_resolver.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 25 * - remove phi if it has only SafePoint in users 26 * - if phi has no type, then set type determined from its inputs 31 : graph_(graph), in PhiResolver() 32 real_inputs_(graph->GetLocalAllocator()->Adapter()), in PhiResolver() 33 phi_users_(graph->GetLocalAllocator()->Adapter()), in PhiResolver() 34 real_users_(graph->GetLocalAllocator()->Adapter()) in PhiResolver() 44 for (auto bb : graph_->GetBlocksRPO()) { in Run() 45 for (auto inst : bb->AllInstsSafe()) { in Run() [all …]
|
| D | inst_builder.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 35 : graph_(graph), in InstBuilder() 36 runtime_(graph->GetRuntime()), in InstBuilder() 37 defs_(graph->GetLocalAllocator()->Adapter()), in InstBuilder() 39 VREGS_AND_ARGS_COUNT(graph->GetRuntime()->GetMethodRegistersCount(method) + in InstBuilder() 40 graph->GetRuntime()->GetMethodTotalArgumentsCount(method)), in InstBuilder() 41 instructions_buf_(GetGraph()->GetRuntime()->GetMethodCode(GetGraph()->GetMethod())), in InstBuilder() 42 class_id_ {runtime_->GetClassIdForMethod(method_)} in InstBuilder() 44 no_type_marker_ = GetGraph()->NewMarker(); [all …]
|
| D | inst_builder-inl.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 22 // NOLINTNEXTLINE(misc-definitions-in-headers) 23 // NOLINTNEXTLINE(misc-definitions-in-headers) 27 auto method = GetGraph()->GetMethod(); in BuildLoadFromPool() 30 auto save_state = CreateSaveState(Opcode::SaveState, GetPc(bc_inst->GetAddress())); in BuildLoadFromPool() 32 // NOLINTNEXTLINE(readability-magic-numbers) in BuildLoadFromPool() 34 …type_id = GetRuntime()->ResolveOffsetByIndex(GetGraph()->GetMethod(), bc_inst->GetId(0).AsIndex()); in BuildLoadFromPool() 35 inst = GetGraph()->CreateInstLoadString(DataType::REFERENCE, GetPc(bc_inst->GetAddress())); in BuildLoadFromPool() 36 inst->SetTypeId(type_id); in BuildLoadFromPool() [all …]
|
| /arkcompiler/runtime_core/compiler/optimizer/ir/ |
| D | ir_constructor.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 42 * BASIC_BLOCK(2, -1) { 47 * g->Dump(cerr); 54 …* All remaining arguments are IDs of successors blocks. '-1' value means that there is no… 74 graph_ = graph; in SetGraph() 75 if (graph_->GetStartBlock() == nullptr) { in SetGraph() 76 graph_->CreateStartBlock(); in SetGraph() 78 if (graph_->GetEndBlock() == nullptr) { in SetGraph() 79 graph_->CreateEndBlock(0U); in SetGraph() [all …]
|
| D | basicblock.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 25 : graph_(graph), in BasicBlock() 26 preds_(graph_->GetAllocator()->Adapter()), in BasicBlock() 27 succs_(graph_->GetAllocator()->Adapter()), in BasicBlock() 28 dom_blocks_(graph_->GetAllocator()->Adapter()), in BasicBlock() 35 return (graph_->GetStartBlock() == this); in IsStartBlock() 39 return (graph_->GetEndBlock() == this); in IsEndBlock() 49 return (GetLoop()->GetHeader() == this); in IsLoopHeader() 55 ASSERT(inst->GetBasicBlock() == this); in SplitBlockAfterInstruction() [all …]
|
| D | graph_checker.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 44 GetGraph()->GetPassManager()->SetCheckMode(false); in ~GraphChecker() 94 return graph_; in GetGraph() 109 return GetGraph()->GetBlocksRPO(); in GetBlocksToVisit() 122 if (inst1->GetBasicBlock()->GetGraph()->IsDynamicMethod() && in CheckCommonTypes() 123 (inst1->GetType() == DataType::ANY || inst2->GetType() == DataType::ANY)) { in CheckCommonTypes() 126 DataType::Type type1 = inst1->GetType(); in CheckCommonTypes() 127 DataType::Type type2 = inst2->GetType(); in CheckCommonTypes() 131 Graph *graph_;
|
| D | graph.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 50 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 150 vector_bb_(allocator->Adapter()), in Graph() 151 throwable_insts_(allocator->Adapter()), in Graph() 154 pass_manager_(this, parent != nullptr ? parent->GetPassManager() : nullptr), in Graph() 155 event_writer_(runtime->GetClassNameFromMethod(method), runtime->GetMethodName(method)), in Graph() 157 single_implementation_list_(allocator->Adapter()), in Graph() 158 try_begin_blocks_(allocator->Adapter()), in Graph() 159 spilled_constants_(allocator->Adapter()), in Graph() [all …]
|
| /arkcompiler/runtime_core/compiler/optimizer/optimizations/regalloc/ |
| D | reg_alloc_resolver.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 27 …explicit RegAllocResolver(Graph *graph) : graph_(graph), liveness_(&graph->GetAnalysis<LivenessAna… in RegAllocResolver() 53 return graph_->IsBytecodeOptimizer() && inst->GetDstReg() == ACC_REG_ID; in CanStoreToAccumulator() 57 return graph_->IsBytecodeOptimizer() && inst->GetSrcReg(input_number) == ACC_REG_ID; in CanReadFromAccumulator() 69 save_state->GetRootsRegsMask().set(location.GetValue()); in AddLocationToRoots() 71 save_state->GetRootsStackMask()->SetBit(location.GetValue()); in AddLocationToRoots() 74 auto slot_offset = graph->GetStackSlotsCount(); in AddLocationToRoots() 75 save_state->GetRootsStackMask()->SetBit(location.GetValue() + slot_offset); in AddLocationToRoots() 81 return graph_; in GetGraph() [all …]
|
| D | split_resolver.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 28 for (auto interval : liveness_->GetLifeIntervals()) { in Run() 29 if (interval->GetSibling() == nullptr) { in Run() 32 ASSERT(!interval->IsPhysical()); in Run() 38 for (auto block : liveness_->GetLinearizedBlocks()) { in Run() 40 if (!block->IsEndBlock()) { in Run() 48 …for (auto prev = interval, curr = interval->GetSibling(); curr != nullptr; prev = curr, curr = cur… in ConnectSiblings() 49 if (prev->GetEnd() != curr->GetBegin() || prev->GetLocation() == curr->GetLocation() || in ConnectSiblings() 50 curr->GetLocation().IsConstant()) { in ConnectSiblings() [all …]
|
| D | split_resolver.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 25 …explicit SplitResolver(Graph *graph) : SplitResolver(graph, &graph->GetAnalysis<LivenessAnalyzer>(… in SplitResolver() 26 …explicit SplitResolver(Graph *graph, LivenessAnalyzer *liveness) : graph_(graph), liveness_(livene… in SplitResolver() 47 if (!inst->IsSpillFill()) { in Is() 50 auto sf = inst->CastToSpillFill(); in Is() 51 ASSERT(sf->GetSpillFillType() != SpillFillType::UNKNOWN); in Is() 52 return sf->GetSpillFillType() == expected_type; in Is() 56 Graph *graph_;
|
| /arkcompiler/runtime_core/compiler/tests/ |
| D | unit_test.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 39 if (arg_types == nullptr || index >= arg_types->size()) { in GetMethodTotalArgumentType() 42 return arg_types->at(index); in GetMethodTotalArgumentType() 50 return arg_types->size(); in GetMethodTotalArgumentsCount() 73 // We have issue with QEMU - so reduce memory heap in CommonTest() 108 return GetAllocator()->New<Graph>(GetAllocator(), GetLocalAllocator(), arch_, is_osr); 113 return GetAllocator()->New<Graph>(GetAllocator(), GetLocalAllocator(), arch, false); in CreateEmptyGraph() 118 …auto graph = GetAllocator()->New<Graph>(GetAllocator(), GetLocalAllocator(), arch_, is_dynamic, fa… 119 graph->CreateStartBlock(); [all …]
|
| D | life_intervals_test.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 22 LifeIntervalsTest() : graph_(CreateEmptyGraph()) {} in LifeIntervalsTest() 26 auto inst = graph_->CreateInstConstant(42); in Create() 27 auto li = GetAllocator()->New<LifeIntervals>(GetAllocator(), inst); in Create() 29 li->AppendRange(range->first, range->second); in Create() 42 ASSERT_EQ((*it)->GetSibling(), nullptr); in CheckSiblings() 44 ASSERT_EQ((*it)->GetSibling(), *next); in CheckSiblings() 52 auto li_ranges = interval->GetRanges(); in CheckRanges() 66 Graph *graph_; member in panda::compiler::LifeIntervalsTest [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/ |
| D | bytecode_circuit_builder.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 21 #include "libpandafile/bytecode_instruction-inl.h" 39 uint32_t end = size - 2; // 1: end in BuildRegionInfo() 49 info.metaData_ = bytecodes_->GetBytecodeMetaData(pc); in BuildRegionInfo() 105 auto pf = file_->GetPandaFile(); in CollectTryCatchBlockInfo() 106 panda_file::MethodDataAccessor mda(*pf, method_->GetMethodId()); in CollectTryCatchBlockInfo() 114 auto tryStartPc = const_cast<uint8_t *>(method_->GetBytecodeArray() + tryStartOffset); in CollectTryCatchBlockInfo() 115 auto tryEndPc = const_cast<uint8_t *>(method_->GetBytecodeArray() + tryEndOffset); in CollectTryCatchBlockInfo() 130 auto catchBlockPc = const_cast<uint8_t *>(method_->GetBytecodeArray() + pcOffset); in CollectTryCatchBlockInfo() 143 BytecodeRegion &entryBlock = graph_[0]; in BuildEntryBlock() [all …]
|
| D | bytecode_circuit_builder.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 35 #include "ecmascript/interpreter/interpreter-inl.h" 55 static constexpr uint32_t INVALID_BC_INDEX = static_cast<uint32_t>(-1); 58 return this->startBcIndex_ < rhs.startBcIndex_; 63 return this->startBcIndex_ > rhs.startBcIndex_; 68 return this->startBcIndex_ == rhs.startBcIndex_; 101 auto fallThrogth = bcIndex - 1; // 1: fall through in InsertJump() 207 return first->start < second->start; in SortCatches() 214 // Try-Catch infos of dead block should be cleared in UpdateTryCatchInfoForDeadBlock() 230 // if block has no general insts, try-catch infos of it should be cleared in UpdateTryCatchInfoIfNoThrow() [all …]
|
| /arkcompiler/runtime_core/compiler/optimizer/templates/ |
| D | inst_checker_gen.h.erb | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 23 explicit InstChecker(const Graph *graph) : graph_(graph) {} 27 return graph_->GetBlocksRPO(); 37 return inst->GetInput(input).GetInst()->GetType(); 49 ASSERT(!inst->HasUsers()); 51 …ASSERT_DO(CheckType(inst->GetType(), <%= inst.dst.types.map { |x| Operand::cpp_type(x) }.join(', '… 52 …std::cerr << "Wrong dst type '" << DataType::ToString(inst->GetType()) << "' for inst:\n" << *inst… 58 CHECK_EQ(inst->GetInputsCount(), <%= inst.inputs.size %>U); 61 ASSERT(inst->GetInput(<%= i %>).GetInst()->IsSaveState()); [all …]
|
| /arkcompiler/runtime_core/libark_defect_scan_aux/ |
| D | graph.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 70 ASSERT(inst_->IsParameter()); in GetArgIndex() 71 return inst_->CastToParameter()->GetArgNumber(); in GetArgIndex() 76 return inst_->GetPc(); in GetPc() 81 return BasicBlock(inst_->GetBasicBlock()); in GetBasicBlock() 92 for (auto &input : inst_->GetInputs()) { in GetInputInsts() 93 if (!input.GetInst()->IsSaveState()) { in GetInputInsts() 103 auto user_list = inst_->GetUsers(); in GetUserInsts() 105 if (!user.GetInst()->IsSaveState()) { in GetUserInsts() 114 ASSERT(inst_->IsIntrinsic()); in GetImms() [all …]
|
| D | function.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 34 return graph_; in GetGraph() 88 graph_.VisitAllInstructions([&](const Inst &inst) { in GetReturnInstList() 100 auto &cur_call_inst = callee_info->GetCallInst(); in GetCalleeInfoByCallInst()
|
| /arkcompiler/runtime_core/libark_defect_scan_aux/include/ |
| D | function.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 35 … : func_name_(func_name), m_id_(m_id), arg_count_(arg_count), graph_(graph), abc_file_(abc_file) in Function() 68 const Graph graph_; variable
|
| D | graph.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 81 explicit Graph(const compiler::Graph *graph) : graph_(graph) {} in Graph() 90 const compiler::Graph *graph_ {nullptr};
|