| /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 36 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 48 : graph_(graph), in PassManager() 49 optimizations_(graph->GetAllocator()->Adapter()), in PassManager() 50 … ANALYSES(details::PredefinedAnalyses::Instantiate<Analysis *>(graph_->GetAllocator(), graph_)), in PassManager() 51 stats_((parent_pm == nullptr) ? graph->GetAllocator()->New<PassManagerStatistics>(graph) in PassManager() 52 : parent_pm->GetStatistics()) in PassManager() 59 std::string delimiters = "~`@#$%^&*()-+=\\|/\"<>;,.[]"; in ClearFileName() 63 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 38 // NOLINTNEXTLINE(fuchsia-multiple-inheritance) 58 ArenaVector<T> vec(allocator->Adapter()); in Instantiate() 60 ((vec.push_back(allocator->New<Types>((std::forward<Args>(args))...))), ...); in Instantiate() 94 auto local_mem_size_before = GetLocalAllocator()->GetAllocatedSize(); in RunPass() 96 // NOLINTNEXTLINE(readability-braces-around-statements) in RunPass() 100 // NOLINTNEXTLINE(readability-misleading-indentation) in RunPass() 102 T pass(graph_, std::forward<Args>(args)...); in RunPass() 108 GetLocalAllocator()->Resize(local_mem_size_before); in RunPass() [all …]
|
| /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 24 * - remove phi if it has only SafePoint in users 25 * - if phi has no type, then set type determined from its inputs 30 : graph_(graph), in PhiResolver() 31 real_inputs_(graph->GetLocalAllocator()->Adapter()), in PhiResolver() 32 phi_users_(graph->GetLocalAllocator()->Adapter()), in PhiResolver() 33 real_users_(graph->GetLocalAllocator()->Adapter()) in PhiResolver() 43 for (auto bb : graph_->GetBlocksRPO()) { in Run() 44 for (auto inst : bb->AllInstsSafe()) { in Run() [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) 25 auto any_check = graph_->CreateInstAnyTypeCheck(DataType::ANY, bc_addr); in BuildAnyTypeCheckInst() 26 any_check->SetInput(0, input); in BuildAnyTypeCheckInst() 27 any_check->SetInput(1, save_state); in BuildAnyTypeCheckInst() 28 any_check->SetAnyType(type); in BuildAnyTypeCheckInst() 34 // NOLINTNEXTLINE(misc-definitions-in-headers) 38 auto method = GetGraph()->GetMethod(); in BuildLoadFromPool() 41 auto save_state = CreateSaveState(Opcode::SaveState, GetPc(bc_inst->GetAddress())); in BuildLoadFromPool() [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() 43 class_id_ {runtime_->GetClassIdForMethod(method_)} in InstBuilder() 45 no_type_marker_ = GetGraph()->NewMarker(); [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 | aot_data.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 22 …return -(static_cast<size_t>(RuntimeInterface::IntrinsicId::COUNT) * PointerSize(graph_->GetArch()… in GetEpTableOffset() 27 auto offset = slow_path_data_->GetSharedSlowPathOffset(id); in GetSharedSlowPathOffset() 31 return offset - (code_address_ + pc + CodeInfo::GetCodeOffset(graph_->GetArch())); in GetSharedSlowPathOffset() 36 …slow_path_data_->SetSharedSlowPathOffset(id, code_address_ + pc + CodeInfo::GetCodeOffset(graph_->… in SetSharedSlowPathOffset() 44 offset += slot_id * PointerSize(graph_->GetArch()); in GetEntrypointOffset() 46 offset -= (code_address_ + pc); in GetEntrypointOffset() 48 offset -= CodeInfo::GetCodeOffset(graph_->GetArch()); in GetEntrypointOffset() 55 auto slot = got_plt_->find({pfile_, method_id}); in GetPltSlotOffset() [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 | aot_data.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 65 graph_(graph), in AotData() 113 Graph *graph_ {nullptr};
|
| /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 …]
|
| /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() 55 return graph_->IsBytecodeOptimizer() && inst->GetDstReg() == ACC_REG_ID; in CanStoreToAccumulator() 59 return graph_->IsBytecodeOptimizer() && inst->GetSrcReg(input_number) == ACC_REG_ID; in CanReadFromAccumulator() 71 save_state->GetRootsRegsMask().set(location.GetValue()); in AddLocationToRoots() 73 save_state->GetRootsStackMask()->SetBit(location.GetValue()); in AddLocationToRoots() 76 auto slot_offset = graph->GetStackSlotsCount(); in AddLocationToRoots() 77 save_state->GetRootsStackMask()->SetBit(location.GetValue() + slot_offset); in AddLocationToRoots() 83 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/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 - 1; // 1: end in BuildRegionInfo() 49 info.metaData_ = bytecodes_->GetBytecodeMetaData(pc); in BuildRegionInfo() 80 offset = -(static_cast<int32_t>(pc - GetFirstPC())); in GetJumpOffset() 136 panda_file::MethodDataAccessor mda(*pf_, method_->GetMethodId()); in CollectTryCatchBlockInfo() 144 auto tryStartPc = const_cast<uint8_t *>(method_->GetBytecodeArray() + tryStartOffset); in CollectTryCatchBlockInfo() 145 auto tryEndPc = const_cast<uint8_t *>(method_->GetBytecodeArray() + tryEndOffset); in CollectTryCatchBlockInfo() 160 auto catchBlockPc = const_cast<uint8_t *>(method_->GetBytecodeArray() + pcOffset); in CollectTryCatchBlockInfo() 175 graph_.resize(blockSize); in BuildRegions() [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/irtoc/backend/ |
| D | compilation_unit.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 53 return graph_; in GetGraph() 58 return graph_; in GetGraph() 87 return GetGraph()->GetArch(); in GetArch() 92 return GetGraph()->GetRuntime(); in GetRuntime() 109 Graph *graph_ {nullptr};
|
| /arkcompiler/runtime_core/compiler/optimizer/code_generator/ |
| D | spill_fill_encoder.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 48 // Stack slot is 64-bit wide, so we can only combine types that could be widened up to in CanCombineSpillFills() 50 if (!DataType::Is64Bits(pred.GetCommonType(), graph->GetArch())) { in CanCombineSpillFills() 61 if (spill_fills->size() > MAX_VECTOR_LEN) { in SortSpillFillData() 63 << spill_fills->size(); in SortSpillFillData() 66 auto it = spill_fills->begin(); in SortSpillFillData() 67 while (it != spill_fills->end()) { in SortSpillFillData() 68 …ill fills only within group of consecutive SpillFillData elements sharing the same spill-fill type. in SortSpillFillData() 71 bool is_fill = it->SrcType() == LocationType::STACK && it->GetDst().IsAnyRegister(); in SortSpillFillData() [all …]
|
| D | spill_fill_encoder.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 42 return graph->GetArch() == Arch::AARCH64 && options.IsCompilerSpillFillPair(); in IsCombiningEnabled() 47 if (graph_->GetArch() == Arch::AARCH32) { in GetDstReg() 65 Graph *graph_; variable
|
| /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};
|