| /arkcompiler/runtime_core/static_core/libllvmbackend/transforms/passes/inline_ir/ |
| D | cleanup_inline_module.cpp | 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 24 #include <llvm/IR/Function.h> 25 #include <llvm/IR/Module.h> 26 #include <llvm/IR/ValueSymbolTable.h> 27 #include <llvm/Pass.h> 28 #include <llvm/Support/Debug.h> 29 #include <llvm/Transforms/IPO/FunctionImport.h> 30 #include <llvm/Transforms/Utils/FunctionImportUtils.h> 34 #define DEBUG_TYPE "cleanup-inline-module" [all …]
|
| /arkcompiler/runtime_core/static_core/irtoc/backend/ |
| D | options.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 19 - name: irtoc-output 22 description: Output file name 23 - name: irtoc-output-llvm 26 description: Output file name for object file generated by llvm 27 - name: irtoc-llvm-stats 31 - none 32 - short 33 - full [all …]
|
| D | CMakeLists.txt | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 43 …les_properties(function.cpp compilation.cpp dwarf_builder.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow) 58 # TARGET_NAME - name of the target, that will generate object file. Thereby user can make depende… 59 # INPUT_FILES - input Irtoc scripts, usually it is files from `irtoc/scripts` folder. 60 # TARGET_VARIABLE - name of a variable, which will hold name of the generated object file, so the… 62 # TARGET_VARIABLE_LLVM - name of a variable, which will hold name of the object file generated by… 64 # LLVM_BACKEND_INLINE_MODULE_FILES - a list of LLVM IR bitcode module files for inlining 65 # SKIP_VALIDATION - skip validation process (necessary for LLVM FastPath compilation) 82 IR_API ir-constructor [all …]
|
| /arkcompiler/runtime_core/static_core/libllvmbackend/object_code/ |
| D | created_object_file.cpp | 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 20 #include <llvm/Support/Debug.h> 21 #include <llvm/Support/FileSystem.h> 23 #define DEBUG_TYPE "created-object-file" 27 CreatedObjectFile::CreatedObjectFile(std::unique_ptr<llvm::MemoryBuffer> objectFileBuffer, in CreatedObjectFile() 28 std::unique_ptr<llvm::object::ObjectFile> objectFile) in CreatedObjectFile() 34 for (auto section : objectFile_->sections()) { in CreatedObjectFile() 40 llvm::Expected<std::unique_ptr<CreatedObjectFile>> CreatedObjectFile::CopyOf(llvm::MemoryBufferRef … in CopyOf() 42 auto copy = llvm::MemoryBuffer::getMemBufferCopy(objectFileBuffer.getBuffer()); in CopyOf() [all …]
|
| D | created_object_file.h | 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 19 #include <llvm/Object/ObjectFile.h> 26 constexpr llvm::StringRef RO_DATA_SECTION_PREFIX {".rodata"}; 27 constexpr llvm::StringRef TEXT_SECTION_PREFIX {".text."}; 28 constexpr llvm::StringRef AOT_GOT_SECTION {".aot_got"}; 29 constexpr llvm::StringRef RELA_LLVM_STACKMAPS_SECTION {".rela.llvm_stackmaps"}; 74 …static llvm::Expected<std::unique_ptr<CreatedObjectFile>> CopyOf(llvm::MemoryBufferRef objectFileB… 76 explicit CreatedObjectFile(std::unique_ptr<llvm::MemoryBuffer> objectFileBuffer, 77 std::unique_ptr<llvm::object::ObjectFile> objectFile); [all …]
|
| /arkcompiler/runtime_core/static_core/ |
| D | README.md | 9 1. [Quick setup](#quick-setup) 10 1. [Launch "Hello world!" on ArkVM](#launch-hello-world-on-arkvm) 14 1. [How to use es2panda, ark, ark_aot, verifier](#how-to-use-es2panda-ark-ark_aot-verifier) 15 1. [Build modes](#build-modes) 17 1. [Enable CPU features](#enable-cpu-features) 18 1. [Plugins system](#plugins-system) 19 1. [Building with GN (still not all targets are supported)](#building-with-gn) 20 1. [Building with LLVM Backend](#building-with-llvm-backend) 21 1. [Launch cross-compiled ARM64/ARM32 tests with QEMU](#launch-cross-compiled-arm64arm32-tests-with… 22 1. [Install third party](#install-third-party) [all …]
|
| D | ark_config.gni | 1 # Copyright (c) 2021-2025 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 107 # - !runtime_core_enable_codegen in chipset 133 "LLVM Irtoc Interpreter requires is_llvmbackend=true") 135 "LLVM Fastpath compilation feature requires is_llvmbackend=true") 137 "LLVM AOT compilation feature requires is_llvmbackend=true") 140 "LLVM Fastpath compilation available only for arm64 target") 192 # data -- a list of data sources, YAML files 193 # template_file -- template full name 194 # output_file -- output file full name [all …]
|
| /arkcompiler/runtime_core/static_core/libllvmbackend/ |
| D | llvm_irtoc_compiler.cpp | 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 33 #include <llvm/Bitcode/BitcodeReader.h> 34 #include <llvm/CodeGen/MachineFunctionPass.h> 35 #include <llvm/CodeGen/Passes.h> 37 #include <llvm/Pass.h> 38 #include <llvm/Support/FileSystem.h> 53 methods_(allocator->Adapter()), in LLVMIrtocCompiler() 60 // clang-format off in LLVMIrtocCompiler() 63 … .SetOptLevel(static_cast<llvm::CodeGenOpt::Level>(llvmCompilerOptions.optlevel)) in LLVMIrtocCompiler() [all …]
|
| D | llvmbackend.yaml | 1 # Copyright (c) 2023-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 15 name: llvm 17 description: LLVM AOT compiler for panda 20 - name: llvm-allow-breakage 23 description: Skip errors during LLVM IR generation 24 - name: llvm-fallback 28 - name: llvm-inlining 33 --compiler-inlining which in turn can be overridden by passing this 35 - name: llvm-pre-opt [all …]
|
| D | llvm_irtoc_compiler.h | 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 28 #include <llvm/Support/Error.h> 37 // NOLINTNEXTLINE(fuchsia-multiple-inheritance) 61 void WriteObjectFile(std::string_view output) override; 77 llvm::ExitOnError exitOnErr_; 80 std::unique_ptr<llvm::Module> module_; 88 std::unique_ptr<llvm::TargetMachine> targetMachine_ {nullptr};
|
| /arkcompiler/runtime_core/static_core/tests/checked/ |
| D | README.md | 18 - *options: string* - additional options for Panda VM 19 - *entry: string* - entry point, default - `_GLOBAL::main` 20 - *result: int* - expected value to be returned by the `panda` application 21 - *abort: int* - expected terminal signal 22 - *env: string* - environment variables setup string to be used as execution command prefix 23 - *force_jit: bool* - run jit compilation for every executed method 24 - *force_profiling: bool* - enables profdata collection for every interpreter-executed method 25 - *pgo_emit_profdata: bool* - enables on-disk generating for profile data to be used in PGO 26 * **RUN_PAOC** run paoc application on the compiled panda file. Output panda file will be passed to… 28 - *options: string* - additional options for paoc [all …]
|
| D | checker.rb | 2 # Copyright (c) 2021-2025 Huawei Device Co., Ltd. 7 # http://www.apache.org/licenses/LICENSE-2.0 25 opts.on('--run-prefix=PREFIX', 'Prefix that will be inserted before panda run command') do |v| 28 opts.on('--source=FILE', 'Path to source file') 29 opts.on('--test-file=FILE', 'Path to test file') do |v| 32 opts.on('--panda=PANDA', 'Path to panda') 33 opts.on('--paoc=PAOC', 'Path to paoc') do |v| 36 opts.on('--frontend=FRONTEND', 'Path to frontend binary') 37 opts.on('--panda-options=OPTIONS', 'Default options for panda run') do |v| 40 opts.on('--paoc-options=OPTIONS', 'Default options for paoc run') do |v| [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ |
| D | CMakeLists.txt | 1 # Copyright (c) 2021-2025 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 64 set(FIRST_ABC_APP_TARGET ${TARGET}-${SRC_FNAME}-0-ets-es2panda) 68 set(ABC_APP_TARGET ${TARGET}-${SRC_FNAME}-${i}-ets-es2panda) 77 COMMAND bash -c "diff ${APP_FILE_OUTPUT} ${first}" 100 set(ABC_TARGET ${TARGET}-ets-es2panda) 104 --boot-panda-files=${BOOT_PANDA_FILES} 105 --load-runtimes=ets 129 set(ABC_TARGET ${TARGET}-abc) 145 --boot-panda-files=${BOOT_PANDA_FILES} [all …]
|
| /arkcompiler/runtime_core/static_core/irtoc/lang/ |
| D | irtoc.rb | 3 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 8 # http://www.apache.org/licenses/LICENSE-2.0 23 require_relative 'output' 41 #include "runtime/mem/gc/g1/g1-allocator.h" 48 // NOLINTBEGIN(readability-identifier-naming) 53 // NOLINTEND(readability-identifier-naming) 101 raise "Macro can't start with capital letter" if name.to_s.start_with? /[A-Z]/ 107 raise "Macro can't start with capital letter" if name.to_s.start_with? /[A-Z]/ 112 …if args.size != block.arity && block.arity >= 0 || args.size < -(block.arity + 1) && block.arity <… 144 output = "" [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/docs/ |
| D | paoc.md | 4 There are four [modes](#--paoc-mode) of `paoc`: 5 1. `AOT-mode` (default) - compile the files using Ark AOT Compiler and produce an executable; 6 1. `LLVM-mode` - compile the files using LLVM AOT Compiler and produce an executable; 7 … `JIT-mode` - only run compiler (IR builder, optimizations) without generating an executable. This… 8 …1. `OSR-mode` - similiar to `JIT-mode`. Takes into account differences of [OSR](../../docs/on-stac… 12 …l compiler options are applicable, e. g. `--compiler-regex`, `--compiler-non-optimizing` or `--com… 16 #### `--paoc-panda-files` 18 - Comma-separated list of panda files to compile. 21 #### `--compiler-ignore-failures` 23 - A boolean option that allows to continue the compilation if some of the methods are failed to com… [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/tools/paoc/ |
| D | paoc.yaml | 1 # Copyright (c) 2021-2025 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 20 - name: paoc-panda-files 26 - name: paoc-location 31 - name: paoc-boot-location 36 - name: paoc-skip-until 41 - name: paoc-compile-until 46 - name: paoc-mode 50 - aot 51 - llvm [all …]
|
| /arkcompiler/runtime_core/static_core/irtoc/ |
| D | BUILD.gn | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 28 "-isystem", 30 "-isystem", 71 "--input", 73 "--output", 75 "--ark_source_dir", 77 "--isa", 80 "--arch", 82 "--ir-api", [all …]
|
| /arkcompiler/runtime_core/libabckit/scripts/ |
| D | self-check.sh | 2 # Copyright (c) 2024-2025 Huawei Device Co., Ltd. 7 # http://www.apache.org/licenses/LICENSE-2.0 15 set -x 16 set -e 17 set -o pipefail 25 echo "Usage: self-check.sh [options] [mode] --dir=<ohos_dir> " 27 echo " <ohos_dir> -- path to OHOS root " 29 echo " -s, --sanitize build with sanitizers " 30 echo " -c, --coverage collect code coverage " 33 echo " -h, --help print help text " [all …]
|
| /arkcompiler/runtime_core/static_core/cmake/interceptor/ |
| D | parse_args.py | 2 # -- coding: utf-8 -- 9 # http://www.apache.org/licenses/LICENSE-2.0 29 LLVM_PROFDATA_BINARY: str = 'llvm-profdata-14' 31 COVERAGE_TOOLS = {'llvm-cov', 'lcov'} 40 def is_script_file(file_path: str) -> bool: 44 def is_script_call(command_part: str) -> bool: 49 def is_cmake_copy_command(command_parts: List[str]) -> bool: 52 command_parts[1] == '-E' and 56 def is_target_binary(command_part: str) -> bool: 76 def generate_profdata_merge_command(profraw_path: Path) -> str: [all …]
|
| /arkcompiler/ets_runtime/test/ |
| D | test_helper.gni | 6 # http://www.apache.org/licenses/LICENSE-2.0 30 common_options += " --enable-force-gc=false" 70 "--script-file", 73 "--expect-output", 75 "--env-path", 83 rebase_path("//prebuilts/clang/ohos/linux-x86_64/llvm/lib:") + 85 "--timeout-limit", 114 "--script-file", 118 "--expect-output", 120 "--clang-lib-path", [all …]
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/code_coverage/ |
| D | llvm_cov_tool.py | 2 # -*- coding: utf-8 -*- 4 # Copyright (c) 2021-2025 Huawei Device Co., Ltd. 9 # http://www.apache.org/licenses/LICENSE-2.0 32 …__init__(self, build_dir_path: Path, coverage_dir: CoverageDir, cmd_executor: CmdExecutor) -> None: 38 …self.llvm_profdata_binary = self.cmd_executor.get_binary("llvm-profdata", os.getenv('LLVM_PROFDATA… 39 … self.llvm_cov_binary = self.cmd_executor.get_binary("llvm-cov", os.getenv('LLVM_COV_VERSION')) 44 …def get_uniq_profraw_profdata_file_paths(self, component_name: Optional[str] = None) -> List[Path]: 45 file_name = f"{current_process().pid}-{uuid.uuid4()}" 52 file_path = component_profdata_dir / f"{component_name}-{file_name}" 58 def merge_and_delete_prowraw_files(self, profraw_file: Path, profdata_file: Path) -> None: [all …]
|
| /arkcompiler/ets_runtime/common_components/tests/ |
| D | test_helper.gni | 6 # http://www.apache.org/licenses/LICENSE-2.0 29 common_options += " --enable-force-gc=false" 61 "--script-file", 64 "--expect-output", 66 "--env-path", 74 rebase_path("//prebuilts/clang/ohos/linux-x86_64/llvm/lib:") + 76 "--timeout-limit", 105 "--script-file", 109 "--expect-output", 111 "--clang-lib-path", [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/micro-benchmarks/ |
| D | CMakeLists.txt | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 19 add_custom_target(ets_microbenchmarks COMMENT "Running ets micro-benchmarks") 29 list(APPEND INTERPRETER_ARGUMENTS_LIST "llvm") 33 set(script_dir "${PANDA_ROOT}/plugins/ets/tests/scripts/micro-benchmarks") 48 …set(timeout_prefix "timeout --preserve-status --signal=${timeout_signal} --kill-after=10s ${benchm… 49 set(timeout_suffix "|| [ `expr \$? % 128` -eq ${timeout_signal} ]") 61 …python3 run_micro_benchmarks.py --bindir ${CMAKE_BINARY_DIR}/bin --interpreter-type=${int_arg} --m… 66 file(GENERATE OUTPUT ${launch_file} CONTENT "${launcher}")
|
| /arkcompiler/runtime_core/static_core/runtime/asm_defines/ |
| D | CMakeLists.txt | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 64 # We have to disable LTO, because it generates llvm IR instead of assembly for '-S' option. 71 # (-fno-lto doesn't work because compilation fails with inappropriate regalloc) 72 string(REPLACE "-mllvm -regalloc=${PANDA_LLVM_REGALLOC}" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) 73 string(REPLACE "-flto=thin" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) 74 panda_target_compile_options(asm_defines PUBLIC "-Wno-attributes") 75 panda_target_compile_options(asm_defines PUBLIC "-Wno-invalid-offsetof") 76 panda_target_compile_options(asm_defines PUBLIC "-S") 79 panda_target_compile_options(asm_defines PUBLIC "-Wno-inconsistent-dllimport") [all …]
|
| /arkcompiler/toolchain/test/ |
| D | test_helper.gni | 6 # http://www.apache.org/licenses/LICENSE-2.0 61 "--script-file", 64 "--expect-output", 66 "--env-path", 79 rebase_path("//prebuilts/clang/ohos/linux-x86_64/llvm/lib/"), 80 "--timeout-limit", 109 "--script-file", 113 "--expect-output", 115 "--clang-lib-path", 116 rebase_path("${clang_base_path}/lib/${musl_arch}-linux-ohos", [all …]
|