| /arkcompiler/runtime_core/static_core/libllvmbackend/ |
| D | llvmbackend.yaml | 1 # Copyright (c) 2023-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 20 - name: llvm-allow-breakage 24 - name: llvm-fallback 28 - name: llvm-inlining 32 Enable inlining optimization. Default value is overridden by explicit 33 --compiler-inlining which in turn can be overridden by passing this 35 - name: llvm-pre-opt 39 Level of pre-optimization that LLVMAOT does. 43 - name: llvm-recursive-inlining [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/docs/ |
| D | loop_peeling.md | 4 `Loop peeling` optimization modifies the loops with exit-point at loop-header to the loops with exi… 19 - loop is not irreducible; 20 - loop-header is not OSR-entry; 21 - there is only 1 back-edge; 22 - loop-header is a single loop-exit point; 23 - there are no inner loops; 26 [pre-header] 29 /---->[header]--------\ 32 \----[back-edge] [outer] 37 ### 1. Insert pre-loop [all …]
|
| D | redundant_loop_elimination_doc.md | 3 **Redundant Loop Elimination(RLE)** - optimization which find and remove useless loops. 16 1. Loop pre-header connect with loop outer block. 21 for (auto inner_loop : loop->GetInnerLoops()) { 34 …0.i64 Constant 0x0 -> (v4p) … 35 …1.i64 Constant 0x1 -> (v10) … 36 …2.i64 Constant 0xa -> (v5) … 41 …4p.i32 Phi v0(bb8), v10(bb4) -> (v5, v10) … 42 …5.b Compare LT i32 v4p, v2 -> (v6) … 55 …10.i32 Add v4p, v1 -> (v4p) …
|
| D | escape_analysis.md | 4 …nformation about object's scope. Currently there is only one such an optimization - **Scalar repla… 17 …ate to each basic block (BasicBlockState) that binds an object state to each ref-typed instruction. 22 - avoid materialization on StoreObject/LoadObject instructions; 23 - correctly initialize the object if materialization is required; 24 - replace LoadObject from virtual object with the instruction that was stored in the field. 28 …pre-header and then the loop blocks get processed like any other blocks until back edge states are… 33 * alias mapping - a map from an instruction in the original method to an in instruction that should… 66 for each ref-typed instruction inst from block's live ins: 76 vstate(inst) <- field 79 vstate(inst) <- phi(field values from predecessors) [all …]
|
| D | cleanup_doc.md | 1 # Cleanup optimization pass 22 After any optimization which deletes instructions some basic blocks may become empty or may contain… 25 First case is loop pre-header, which may legally be an empty basic block. 27 Second case is a so-called "special triangle" situation, when there are actually two edges between … 52 On first step redundant `Phi` instructions are removed - in short, if `phi` has only one real input… 58 instructions and is not an loop pre-header we still have to check each predecessor block for "speci… 67 During second pass we remove all not `live`-marked instructions. 92 for (auto bb : GetGraph()->GetVectorBlocks()) { 93 if (!SkipBasicBlock(bb) && bb->IsEmpty()) { 94 empty_blocks->insert(bb); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/ |
| D | ets_catch_assert2.ets | 2 * Copyright (c) 2024-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 16 …ER Try Catch Resolving JIT Optimize with false assert to check correctness of LSE optimization 18 …--compiler-enable-jit=true --compiler-check-final=true --gc-type=g1-gc --heap-verifier=fail_on_ver…
|
| D | ets_catch_assert3.ets | 2 * Copyright (c) 2024-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 16 …ER Try Catch Resolving JIT Optimize with false assert to check correctness of LSE optimization 18 …--compiler-enable-jit=true --compiler-check-final=true --gc-type=g1-gc --heap-verifier=fail_on_ver…
|
| D | ets_catch_assert1.ets | 2 * Copyright (c) 2024-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 16 …ER Try Catch Resolving JIT Optimize with false assert to check correctness of LSE optimization 18 …--compiler-enable-jit=true --compiler-check-final=true --gc-type=g1-gc --heap-verifier=fail_on_ver…
|
| D | ets_catch_assert.ets | 2 * Copyright (c) 2024-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 16 …ER Try Catch Resolving JIT Optimize with false assert to check correctness of LSE optimization 18 …--compiler-enable-jit=true --compiler-check-final=true --gc-type=g1-gc --heap-verifier=fail_on_ver…
|
| /arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/ |
| D | loop_peeling.cpp | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 26 * Loop-peeling optimization works with a loops with the following requirements: 27 * - loop is not irreducible; 28 * - there is only 1 back-edge; 29 * - loop-header is a single loop-exit point; 31 * [pre-header] 34 * /---->[header]--------\ 37 * \----[back-edge] [outer] 40 * 1 stage - insert pre-loop which is an if-block: [all …]
|
| D | checks_elimination.h | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 34 // loop->len_array->GroupedBoundsChecks 41 …o; savestate; lower value; upper value; cond code for Deoptimize; head is loop exit; has pre-header 45 // NOLINTNEXTLINE(fuchsia-multiple-inheritance) 46 class ChecksElimination : public Optimization, public GraphVisitor { 47 using Optimization::Optimization; 51 : Optimization(graph), in ChecksElimination() 52 boundsChecks_(graph->GetLocalAllocator()->Adapter()), in ChecksElimination() 53 checksForMoveOutOfLoop_(graph->GetLocalAllocator()->Adapter()), in ChecksElimination() [all …]
|
| D | licm.cpp | 2 * Copyright (c) 2021-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 28 …: Optimization(graph), hoistLimit_(hoistLimit), hoistableInstructions_(graph->GetLocalAllocator()-… in Licm() 35 if (!GetGraph()->GetAnalysis<LoopAnalyzer>().IsValid()) { in RunImpl() 36 GetGraph()->GetAnalysis<LoopAnalyzer>().Run(); in RunImpl() 39 ASSERT(GetGraph()->GetRootLoop() != nullptr); in RunImpl() 40 if (!GetGraph()->GetRootLoop()->GetInnerLoops().empty()) { in RunImpl() 41 markerLoopExit_ = GetGraph()->NewMarker(); in RunImpl() 43 for (auto loop : GetGraph()->GetRootLoop()->GetInnerLoops()) { in RunImpl() 46 GetGraph()->EraseMarker(markerLoopExit_); in RunImpl() [all …]
|
| D | simplify_string_builder.cpp | 2 * Copyright (c) 2023-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 32 : Optimization(graph), in SimplifyStringBuilder() 33 instructionsStack_ {graph->GetLocalAllocator()->Adapter()}, in SimplifyStringBuilder() 34 instructionsVector_ {graph->GetLocalAllocator()->Adapter()}, 35 inputDescriptors_ {graph->GetLocalAllocator()->Adapter()}, 36 usages_ {graph->GetLocalAllocator()->Adapter()}, 37 matches_ {graph->GetLocalAllocator()->Adapter()}, 38 stringBuilderCalls_ {graph->GetLocalAllocator()->Adapter()}, 39 stringBuilderFirstLastCalls_ {graph->GetLocalAllocator()->Adapter()} [all …]
|
| /arkcompiler/runtime_core/libabckit/include/cpp/headers/ |
| D | base_concepts.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 30 * @brief Lightweight checker that ensures core<->target API conversion validity 32 * In case of inheritance the empty base optimization will be applied 34 * In case of non-static member, it should be combined with ABCKIT_NO_UNIQUE_ADDRESS attribute 35 * @tparam TargetT - View class for a target specialized C API (not core) 41 * @brief Provides compile-time static contract checks 47 * pre-C++20 concept idiom with SFINAE and decltype to check type expression valideness 48 * @tparam T - type that is inspected againts the contract 57 * pre-C++20 concept idiom with SFINAE and decltype to check type expression valideness 58 * @tparam T - type that is inspected againts the contract [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/regalloc/ |
| D | reg_alloc_base.cpp | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 31 … : RegAllocBase(graph, graph->GetArchUsedRegs(), graph->GetArchUsedVRegs(), GetMaxNumStackSlots()) in RegAllocBase() 36 : Optimization(graph), in RegAllocBase() 37 regsMask_(graph->GetLocalAllocator()), in RegAllocBase() 38 vregsMask_(graph->GetLocalAllocator()), in RegAllocBase() 39 stackMask_(graph->GetLocalAllocator()), in RegAllocBase() 40 stackUseLastPositions_(graph->GetLocalAllocator()->Adapter()) in RegAllocBase() 48 : Optimization(graph), in RegAllocBase() 49 regsMask_(graph->GetLocalAllocator()), in RegAllocBase() [all …]
|
| /arkcompiler/runtime_core/compiler/optimizer/optimizations/regalloc/ |
| D | reg_alloc_base.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 31 : Optimization(graph), in RegAllocBase() 32 regs_mask_(graph->GetLocalAllocator()), in RegAllocBase() 33 vregs_mask_(graph->GetLocalAllocator()), in RegAllocBase() 34 stack_mask_(graph->GetLocalAllocator()), in RegAllocBase() 35 stack_use_last_positions_(graph->GetLocalAllocator()->Adapter()) in RegAllocBase() 43 : Optimization(graph), in RegAllocBase() 44 regs_mask_(graph->GetLocalAllocator()), in RegAllocBase() 45 vregs_mask_(graph->GetLocalAllocator()), in RegAllocBase() [all …]
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | cleanup_doc.md | 1 # Cleanup optimization pass 22 After any optimization which deletes instructions some basic blocks may become empty or may contain… 25 First case is loop pre-header, which may legally be an empty basic block. 27 Second case is a so-called "special triangle" situation, when there are actually two edges between … 52 On first step redundant `Phi` instructions are removed - in short, if `phi` has only one real input… 58 instructions and is not an loop pre-header we still have to check each predecessor block for "speci… 67 During second pass we remove all not `live`-marked instructions. 92 for (auto bb : GetGraph()->GetVectorBlocks()) { 93 if (!SkipBasicBlock(bb) && bb->IsEmpty()) { 94 empty_blocks->insert(bb); [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/optimizer/ir/ |
| D | graph.h | 2 * Copyright (c) 2021-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 35 // CC-OFFNXT(G.PRE.02) should be with define 41 // CC-OFFNXT(G.PRE.02) should be with define 74 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 82 /* CC-OFFNXT(G.PRE.05) function gen */ \ 86 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 90 /* CC-OFFNXT(G.PRE.05) function gen */ \ 187 vectorBb_(args.allocator->Adapter()), in Graph() 188 throwableInsts_(args.allocator->Adapter()), in Graph() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/ |
| D | cg_options.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 22 maplecl::Option<bool> verboseAsm({"--verbose-asm"}, 23 " --verbose-asm \tAdd comments to asm output\n" 24 " --no-verbose-asm\n", 25 {cgCategory}, maplecl::DisableWith("--no-verbose-asm")); 27 maplecl::Option<bool> verboseCg({"--verbose-cg"}, 28 " --verbose-cg \tAdd comments to cg output\n" 29 " --no-verbose-cg\n", 30 {cgCategory}, maplecl::DisableWith("--no-verbose-cg")); 32 maplecl::Option<bool> cg({"--cg"}, [all …]
|
| D | reg_alloc_lsra.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 22 /* Here, kLoopWeight is a fine-tuned empirical parameter */ 53 LogInfo::MapleLogger() << "(assigned " << regType << (li.GetAssignedReg() - base) << ")"; in PrintLiveRanges() 70 LogInfo::MapleLogger() << "func: " << cgFunc->GetName() << "\n"; in PrintAllLiveRanges() 72 if (li == nullptr || li->GetRegNO() == 0) { in PrintAllLiveRanges() 75 LogInfo::MapleLogger() << "vreg" << li->GetRegNO() << ": "; in PrintAllLiveRanges() 84 const auto &referenceMapInsns = cgFunc->GetStackMapInsns(); in SpillStackMapInfo() 87 auto &deoptInfo = insn->GetStackMap()->GetDeoptInfo(); in SpillStackMapInfo() 91 if (!opnd->IsRegister()) { in SpillStackMapInfo() 94 … auto *li = liveIntervalsArray[(static_cast<const RegOperand *>(opnd))->GetRegisterNumber()]; in SpillStackMapInfo() [all …]
|
| /arkcompiler/runtime_core/compiler/optimizer/ir/ |
| 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/static_core/plugins/ets/compiler/ |
| D | codegen_intrinsics_ets.cpp | 2 * Copyright (c) 2023-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 73 GetEncoder()->EncodeTrunc(dst, src[0]); in CreateMathTrunc() 78 GetEncoder()->EncodeRoundToPInfReturnFloat(dst, src[0]); in CreateETSMathRound() 85 switch (inst->GetIntrinsicId()) { in CreateArrayCopyTo() 127 auto *runtime = cg->GetGraph()->GetRuntime(); in GenerateSbAppendCall() 128 if (cg->GetGraph()->IsAotMode()) { in GenerateSbAppendCall() 129 auto *enc = cg->GetEncoder(); in GenerateSbAppendCall() 131 …enc->EncodeLdr(klass, false, MemRef(cg->ThreadReg(), runtime->GetArrayU16ClassPointerTlsOffset(cg-… in GenerateSbAppendCall() 132 cg->CallFastPath(inst, entrypoint, args.Dst(), {}, args.Builder(), args.Value(), klass); in GenerateSbAppendCall() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/aarch64/ |
| D | aarch64_insn.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 38 DEBUG_ASSERT(opndProp == nullptr || opndProp->IsRegister(), "operand type doesn't match"); in Visit() 39 uint32 size = v->GetSize(); in Visit() 40 regno_t regNO = v->GetRegisterNumber(); in Visit() 41 uint8 opndSize = (opndProp != nullptr) ? opndProp->GetSize() : size; in Visit() 42 switch (v->GetRegisterType()) { in Visit() 52 uint32 regSet = static_cast<uint32>(__builtin_ctz(static_cast<uint32>(opndSize)) - 3); in Visit() 64 if (v->IsOfstImmediate()) { in Visit() 68 if (v->IsStImmediate()) { in Visit() 69 Visit(*v->GetSymbol(), v->GetValue()); in Visit() [all …]
|
| /arkcompiler/jsvm/interface/kits/ |
| D | jsvm.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 46 #include <stdbool.h> // NOLINT(modernize-deprecated-headers) 47 #include <stddef.h> // NOLINT(modernize-deprecated-headers) 49 // Use INT_MAX, this should only be consumed by the pre-processor anyway. 55 // The baseline version for JSVM-API. 58 // functions available in a new version of JSVM-API that is not yet ported in all 98 // clang-format off 171 * @brief This API returns the Symbol.asyncIterator of Well-Known Symbols. 174 * @param result The Symbol.asyncIterator of Well-Known Symbols. 184 * @brief This API returns the Symbol.hasInstance of Well-Known Symbols. [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/llvm/ |
| D | llvm_ir_builder.cpp | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 23 #pragma clang diagnostic ignored "-Wshadow" 24 #pragma clang diagnostic ignored "-Wunused-parameter" 25 #pragma clang diagnostic ignored "-Wdeprecated-declarations" 28 #pragma GCC diagnostic ignored "-Wshadow" 29 #pragma GCC diagnostic ignored "-Wunused-parameter" 30 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 52 module_(module->GetModule()), in LLVMIRBuilder() 63 ASSERT(compCfg_->Is64Bit()); in LLVMIRBuilder() [all …]
|