Home
last modified time | relevance | path

Searched +full:graph +full:- (Results 1 – 25 of 215) sorted by relevance

123456789

/arkcompiler/runtime_core/compiler/
Doptimizer_run.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
25 #include "optimizer/ir/graph.h"
54 static inline bool RunCodegenPass(Graph *graph) in RunCodegenPass() argument
56 if (graph->GetMethodProperties().GetRequireFrameSetup()) { in RunCodegenPass()
57 return graph->RunPass<Codegen>(); in RunCodegenPass()
59 return graph->RunPass<CodegenNative>(); in RunCodegenPass()
62 bool RunOptimizations(Graph *graph) in RunOptimizations() argument
64 auto finalizer = [graph](void * /* unused */) { graph->GetPassManager()->Finalize(); }; in RunOptimizations()
70 graph->SetArchUsedRegs(options.GetCompilerRegallocRegMask()); in RunOptimizations()
[all …]
Dcompile_method.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
36 static Span<uint8_t> EmitElf(Graph *graph, CodeAllocator *code_allocator, ArenaAllocator *gdb_debug…
54 static bool CheckSingleImplementation(Graph *graph) in CheckSingleImplementation() argument
59 auto cha = graph->GetRuntime()->GetCha(); in CheckSingleImplementation()
60 for (auto si_method : graph->GetSingleImplementationList()) { in CheckSingleImplementation()
61 if (!cha->IsSingleImplementation(si_method)) { in CheckSingleImplementation()
63 … << "Method lost single-implementation property after compilation, so we need to drop " in CheckSingleImplementation()
65 << graph->GetRuntime()->GetMethodFullName(si_method); in CheckSingleImplementation()
72 static Span<uint8_t> EmitCode(const Graph *graph, CodeAllocator *allocator) in EmitCode() argument
[all …]
/arkcompiler/runtime_core/compiler/tests/
Dunit_test.h2 * 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()
106 Graph *CreateEmptyGraph(bool is_osr = false) const
108 return GetAllocator()->New<Graph>(GetAllocator(), GetLocalAllocator(), arch_, is_osr);
111 Graph *CreateEmptyGraph(Arch arch) const in CreateEmptyGraph()
113 return GetAllocator()->New<Graph>(GetAllocator(), GetLocalAllocator(), arch, false); in CreateEmptyGraph()
[all …]
Dinst_generator.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
19 Graph *GraphCreator::GenerateGraph(Inst *inst) in GenerateGraph()
21 Graph *graph; in GenerateGraph() local
23 switch (inst->GetOpcode()) { in GenerateGraph()
38 // -1 means special processing in GenerateGraph()
39 graph = GenerateOperation(inst, -1); in GenerateGraph()
47 graph = GenerateOperation(inst, 0); in GenerateGraph()
74 graph = GenerateOperation(inst, 1); in GenerateGraph()
106 graph = GenerateOperation(inst, 2); in GenerateGraph()
[all …]
Dir_builder_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
67 auto graph = CreateGraphWithDefaultRuntime(); in CheckSimple() local
68 GRAPH(graph) in CheckSimple()
73 BASIC_BLOCK(2, -1) in CheckSimple()
79 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckSimple()
107 auto graph = CreateGraphWithDefaultRuntime(); in CheckSimpleWithImm() local
109 GRAPH(graph) in CheckSimpleWithImm()
114 BASIC_BLOCK(2, -1) in CheckSimpleWithImm()
120 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in CheckSimpleWithImm()
[all …]
Dcodegen_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
87 CodegenTest() : exec_module_(GetAllocator(), GetGraph()->GetRuntime()) in CodegenTest()
91 GetGraph()->SetLowLevelInstructionsEnabled(); in CodegenTest()
117 void CheckReturnValue(Graph *graph, T expected_value);
129 bool RunCodegen(Graph *graph) in RunCodegen() argument
131 if (!graph->RunPass<Codegen>()) { in RunCodegen()
141 movi.64 v0, 100000000 ## 0 -> 3 ## bb0 in TEST_F()
142 movi.64 v1, 4294967296 ## 1 -> 4 ## bb0 in TEST_F()
143 ldai 0 ## 2 -> 5 ## bb0 in TEST_F()
[all …]
Dgraph_creation_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
27 Graph *graph = CreateEmptyGraph(); in TEST_F() local
28 EXPECT_NE(graph, nullptr); in TEST_F()
33 Graph *graph = CreateGraphStartEndBlocks(); in TEST_F() local
34 EXPECT_NE(graph, nullptr); in TEST_F()
35 EXPECT_NE(graph->GetStartBlock(), nullptr); in TEST_F()
36 EXPECT_NE(graph->GetEndBlock(), nullptr); in TEST_F()
37 EXPECT_EQ(graph->GetAliveBlocksCount(), 2U); in TEST_F()
42 auto graph = CreateEmptyGraph(); in TEST_F() local
[all …]
Dadjust_arefs_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
28 auto graph = CreateEmptyFastpathGraph(RUNTIME_ARCH); in TEST_F() local
30 graph->SetLowLevelInstructionsEnabled(); in TEST_F()
32 GRAPH(graph) in TEST_F()
59 Graph *graph_et = CreateEmptyFastpathGraph(RUNTIME_ARCH); in TEST_F()
60 GRAPH(graph_et) in TEST_F()
70 …INST(11, Opcode::AddI).ptr().Inputs(0).Imm(graph->GetRuntime()->GetArrayDataOffset(graph->GetArch(… in TEST_F()
89 ASSERT_TRUE(graph->RunPass<AdjustRefs>()); in TEST_F()
91 GraphChecker(graph).Check(); in TEST_F()
[all …]
Dreg_alloc_common_test.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
25 void RunRegAllocatorsAndCheck(Graph *graph, Checker checker) const in RunRegAllocatorsAndCheck() argument
27 if (graph->GetCallingConvention() == nullptr) { in RunRegAllocatorsAndCheck()
30 …auto graph_ls = GraphCloner(graph, graph->GetAllocator(), graph->GetLocalAllocator()).CloneGraph(); in RunRegAllocatorsAndCheck()
31 ASSERT_TRUE(graph_ls->RunPass<RegAllocLinearScan>()); in RunRegAllocatorsAndCheck()
35 if (GetGraph()->GetArch() == Arch::AARCH32) { in RunRegAllocatorsAndCheck()
38 …auto graph_gc = GraphCloner(graph, graph->GetAllocator(), graph->GetLocalAllocator()).CloneGraph(); in RunRegAllocatorsAndCheck()
39 ASSERT_TRUE(graph_gc->RunPass<RegAllocGraphColoring>()); in RunRegAllocatorsAndCheck()
51 auto graph = CreateEmptyGraph(); in TestParametersLocations() local
53 GRAPH(graph) in TestParametersLocations()
[all …]
Dloop_unroll_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
31 …LoopUnrollTest() : opcodes_count_(GetAllocator()->Adapter()), exec_module_(GetAllocator(), GetGrap… in LoopUnrollTest()
33 LoopUnrollTest() : opcodes_count_(GetAllocator()->Adapter()) in LoopUnrollTest()
39 bool CheckRetOnVixlSimulator([[maybe_unused]] Graph *graph, [[maybe_unused]] T return_value) in CheckRetOnVixlSimulator() argument
44 graph->SetLowLevelInstructionsEnabled(); in CheckRetOnVixlSimulator()
46 EXPECT_TRUE(RegAlloc(graph)); in CheckRetOnVixlSimulator()
47 EXPECT_TRUE(graph->RunPass<Codegen>()); in CheckRetOnVixlSimulator()
48 auto entry = reinterpret_cast<char *>(graph->GetData().Data()); in CheckRetOnVixlSimulator()
49 auto exit = entry + graph->GetData().Size(); in CheckRetOnVixlSimulator()
[all …]
Dlowering_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
29 graph_->SetLowLevelInstructionsEnabled(); in LoweringTest()
35 auto graph = CreateGraphStartEndBlocks(); in ReturnTest() local
37 graph->SetLowLevelInstructionsEnabled(); in ReturnTest()
40 auto cnst = graph->FindOrCreateConstant(val); in ReturnTest()
41 auto block = graph->CreateEmptyBlock(); in ReturnTest()
42 graph->GetStartBlock()->AddSucc(block); in ReturnTest()
43 block->AddSucc(graph->GetEndBlock()); in ReturnTest()
44 auto ret = graph->CreateInstReturn(); in ReturnTest()
[all …]
Dcleanup_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
26 GRAPH(GetGraph()) in TEST_F()
29 BASIC_BLOCK(3, -1) in TEST_F()
35 ASSERT_TRUE(GetGraph()->RunPass<Cleanup>()); in TEST_F()
37 auto graph = CreateEmptyGraph(); in TEST_F() local
38 GRAPH(graph) in TEST_F()
40 BASIC_BLOCK(3, -1) in TEST_F()
45 ASSERT_TRUE(GraphComparator().Compare(GetGraph(), graph)); in TEST_F()
50 GRAPH(GetGraph()) in TEST_F()
[all …]
Dtry_catch_resolving_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
65 auto graph = GetGraph(); in TEST_F() local
66 ASSERT_TRUE(ParseToGraph<true>(source, "main", graph)); in TEST_F()
67 graph->RunPass<TryCatchResolving>(); in TEST_F()
68 graph->RunPass<Cleanup>(); in TEST_F()
71 GRAPH(expected_graph) in TEST_F()
75 BASIC_BLOCK(2, -1) in TEST_F()
83 ASSERT_TRUE(GraphComparator().Compare(graph, expected_graph)); in TEST_F()
122 auto graph = GetGraph(); in TEST_F() local
[all …]
/arkcompiler/runtime_core/irtoc/backend/
Dcompilation_unit.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
54 static bool RunIrtocOptimizations(Graph *graph);
61 // NOLINTNEXTLINE(readability-magic-numbers) in Run()
99 …if (compiler::options.WasSetCompilerRegex() && !std::regex_match(unit->GetName(), methods_regex_))… in Compile()
102 LOG(INFO, IRTOC) << "Compile " << unit->GetName(); in Compile()
103 auto result = unit->Compile(arch_); in Compile()
111 static bool RunIrtocInterpreterOptimizations(Graph *graph) in RunIrtocInterpreterOptimizations() argument
114 // TODO(aantipina): re-enable Lse for #6873 in RunIrtocInterpreterOptimizations()
120 graph->RunPass<compiler::Peepholes>(); in RunIrtocInterpreterOptimizations()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/
Dir_builder.h2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
19 #include "optimizer/ir/graph.h"
46 …ries boundaries {}; // NOLINT(misc-non-private-member-variables-in-class…
47 …lock *begin_bb {nullptr}; // NOLINT(misc-non-private-member-variables-in-class…
48 …lock *end_bb {nullptr}; // NOLINT(misc-non-private-member-variables-in-class…
49 …ector<CatchCodeBlock> *catches {nullptr}; // NOLINT(misc-non-private-member-variables-in-class…
50 …ector<BasicBlock *> *basic_blocks {nullptr}; // NOLINT(misc-non-private-member-variables-in-class…
51 …_t id {INVALID_ID}; // NOLINT(misc-non-private-member-variables-in-class…
52 …ontains_throwable_inst {false}; // NOLINT(misc-non-private-member-variables-in-class…
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir/
Dgraph.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
16 #include "graph.h"
36 if (block->SetMarker(mrk)) { in MarkBlocksRec()
39 for (auto succ : block->GetSuccsBlocks()) { in MarkBlocksRec()
44 Graph::~Graph() in ~Graph()
47 encoder_->~Encoder(); in ~Graph()
51 void Graph::RemoveUnreachableBlocks() in RemoveUnreachableBlocks()
60 if (!bb->IsMarked(mrk)) { in RemoveUnreachableBlocks()
63 if (bb->IsTryBegin()) { in RemoveUnreachableBlocks()
[all …]
Dgraph.h2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
36 class Graph; variable
55 * Specifies graph compilation mode.
61 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
77 // The graph is used in BytecodeOptimizer mode
81 // Graph will be compiled with native calling convention
87 // Graph will be compiled for calling inside interpreter
89 // Graph will be compiled for interpreter main loop
123 class Graph final : public MarkerMgr {
[all …]
/arkcompiler/runtime_core/bytecode_optimizer/tests/
Dbytecodeopt_peepholes_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
52 EXPECT_FALSE(GetGraph()->RunPass<BytecodeOptPeepholes>()); in TEST_F()
84 EXPECT_TRUE(GetGraph()->RunPass<BytecodeOptPeepholes>()); in TEST_F()
91 auto graph = CreateEmptyGraph(); in TEST_F() local
92 graph->SetRuntime(&runtime); in TEST_F()
93 GRAPH(graph) in TEST_F()
97 BASIC_BLOCK(2, -1) in TEST_F()
108 EXPECT_TRUE(graph->RunPass<BytecodeOptPeepholes>()); in TEST_F()
109 EXPECT_TRUE(graph->RunPass<compiler::Cleanup>()); in TEST_F()
[all …]
Dconst_array_resolver_test.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
23 auto graph = CreateEmptyGraph(); in TEST_F() local
24 GRAPH(graph) in TEST_F()
29 BASIC_BLOCK(2, -1) in TEST_F()
45 EXPECT_TRUE(graph->RunPass<ConstArrayResolver>(&interface)); in TEST_F()
47 GRAPH(expected) in TEST_F()
52 BASIC_BLOCK(2, -1) in TEST_F()
61 EXPECT_TRUE(GraphComparator().Compare(graph, expected)); in TEST_F()
66 auto graph = CreateEmptyGraph(); in TEST_F() local
[all …]
/arkcompiler/runtime_core/compiler/optimizer/optimizations/
Dscheduler.h2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
19 #include "optimizer/ir/graph.h"
25 explicit Scheduler(Graph *graph) in Scheduler() argument
26 : Optimization(graph), in Scheduler()
27 sched_(graph->GetLocalAllocator()->Adapter()), in Scheduler()
28 loads_(graph->GetLocalAllocator()->Adapter()), in Scheduler()
29 stores_(graph->GetLocalAllocator()->Adapter()), in Scheduler()
30 special_(graph->GetLocalAllocator()->Adapter()), in Scheduler()
31 old_(graph->GetLocalAllocator()->Adapter()), in Scheduler()
[all …]
Dcleanup.h2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
19 #include "optimizer/ir/graph.h"
25 explicit Cleanup(Graph *graph) in Cleanup() argument
26 : Optimization(graph), in Cleanup()
27 empty1_(graph->GetLocalAllocator()->Adapter()), in Cleanup()
28 empty2_(graph->GetLocalAllocator()->Adapter()), in Cleanup()
29 saved_preds_(graph->GetLocalAllocator()->Adapter()), in Cleanup()
30 dead_(graph->GetLocalAllocator()->Adapter()), in Cleanup()
31 temp_(graph->GetLocalAllocator()->Adapter()), in Cleanup()
[all …]
/arkcompiler/runtime_core/bytecode_optimizer/
Doptimize_bytecode.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "assembler/assembly-emitter.h"
35 #include "libpandafile/class_data_accessor-inl.h"
44 // NOLINTNEXTLINE(fuchsia-statically-constructed-objects)
48 constexpr void RunOpts(compiler::Graph *graph, [[maybe_unused]] BytecodeOptIrInterface *iface) in RunOpts() argument
50 graph->RunPass<compiler::Cleanup>(); in RunOpts()
51 graph->RunPass<T>(); in RunOpts()
55 constexpr void RunOpts(compiler::Graph *graph, BytecodeOptIrInterface *iface = nullptr) in RunOpts() argument
57 RunOpts<First>(graph, iface); in RunOpts()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/optimizations/regalloc/
Dsplit_resolver.h2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
20 #include "compiler/optimizer/ir/graph.h"
25 …explicit SplitResolver(Graph *graph) : SplitResolver(graph, &graph->GetAnalysis<LivenessAnalyzer>(… in SplitResolver() argument
26 …explicit SplitResolver(Graph *graph, LivenessAnalyzer *liveness) : graph_(graph), liveness_(livene… in SplitResolver() argument
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_;
Dreg_type.h2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
19 #include "compiler/optimizer/ir/graph.h"
23 inline DataType::Type ConvertRegType(const Graph *graph, DataType::Type type) in ConvertRegType() argument
26 return graph->IsBytecodeOptimizer() ? DataType::Type::UINT64 : type; in ConvertRegType()
31 if (graph->IsBytecodeOptimizer() && type == DataType::REFERENCE) { in ConvertRegType()
35 bool use_reg32 = graph->IsRegScalarMapped() || graph->IsBytecodeOptimizer(); in ConvertRegType()
36 if (use_reg32 && DataType::Is32Bits(type, graph->GetArch())) { in ConvertRegType()
/arkcompiler/runtime_core/compiler/optimizer/templates/intrinsics/
Dgenerate_operations_intrinsic_graph.inl.erb2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
16 // Autogenerated file -- DO NOT EDIT!
18 Graph* GenerateIntrinsicOperation(Inst* inst) {
19 auto graph = CreateGraphWithOneBasicBlock();
20 auto intrinsic_inst = inst->CastToIntrinsic();
21 switch (intrinsic_inst->GetIntrinsicId()) {
25 … intrinsic_inst->AllocateInputTypes(&allocator_, <%= intrinsic.arguments.length() %>);
27 … intrinsic_inst->AppendInput(CreateParamInst(graph, DataType::<%= arg %>, <%= i %>));
28 intrinsic_inst->AddInputType(DataType::<%= arg %>);
[all …]

123456789