packages/chip/compiler/autofdo-harness/README.md
AutoFDO is sample-based profile-guided optimization. It captures perf
(or RISC-V PMU equivalent) samples on a representative workload, converts
to LLVM's sample profile format, and feeds the result back to clang via
-fprofile-sample-use.
Measured uplift on similar pipelines:
This harness produces the AutoFDO .prof artifact consumed by
autofdo-propeller-bolt.md.
capture.sh — wraps perf record + create_llvm_prof to produce a
sample profile from a workload run.apply.sh — feeds the profile into a clang rebuild.The recipe is committed. End-to-end capture is BLOCKED until:
scripts/build_llvm_riscv.sh).perf record (QEMU virt /
Verilator / FPGA / silicon).create_llvm_prof is installed (LLVM ships it as llvm-profdata for
sample profiles plus the autofdo project at
https://github.com/google/autofdo).