wasm-micro-runtime/core/iwasm/aot/arch
Wenyong Huang 8d88471c46
Implement AOT static PGO (#2243)
LLVM PGO (Profile-Guided Optimization) allows the compiler to better optimize code
for how it actually runs. This PR implements the AOT static PGO, and is tested on
Linux x86-64 and x86-32. The basic steps are:

1. Use `wamrc --enable-llvm-pgo -o <aot_file_of_pgo> <wasm_file>`
   to generate an instrumented aot file.
2. Compile iwasm with `cmake -DWAMR_BUILD_STATIC_PGO=1` and run
      `iwasm --gen-prof-file=<raw_profile_file> <aot_file_of_pgo>`
    to generate the raw profile file.
3. Run `llvm-profdata merge -output=<profile_file> <raw_profile_file>`
    to merge the raw profile file into the profile file.
4. Run `wamrc --use-prof-file=<profile_file> -o <aot_file> <wasm_file>`
    to generate the optimized aot file.
5. Run the optimized aot_file: `iwasm <aot_file>`.

The test scripts are also added for each benchmark, run `test_pgo.sh` under
each benchmark's folder to test the AOT static pgo.
2023-06-05 09:17:39 +08:00
..
aot_reloc_aarch64.c Implement relocation R_AARCH64_JUMP26 for aarch64 (#873) 2021-12-07 10:32:10 +08:00
aot_reloc_arc.c Add missing symbols for arc aot relocation (#1408) 2022-08-23 17:38:55 +08:00
aot_reloc_arm.c Add ARM aeabi memcpy/memmove/memset symbols for AOT bulk memory ops (#1777) 2022-12-02 10:18:20 +08:00
aot_reloc_mips.c Fix potential pointer overflows (#826) 2021-11-15 10:57:37 +08:00
aot_reloc_riscv.c Add missing soft float intrinsics for risc-v AOT (#1845) 2022-12-29 16:00:33 +08:00
aot_reloc_thumb.c Fix issue of thumb relocation R_ARM_THM_MOVT_ABS (#1723) 2022-11-19 19:36:02 +08:00
aot_reloc_x86_32.c Implement AOT static PGO (#2243) 2023-06-05 09:17:39 +08:00
aot_reloc_x86_64.c Implement AOT static PGO (#2243) 2023-06-05 09:17:39 +08:00
aot_reloc_xtensa.c Enable platform support for esp-idf v5.0.1 (#2050) 2023-03-23 17:29:57 +08:00