[llvm] [RISCV] Adopt SpacemitX60's scheduling model for `-mtune=generic` (PR #167008)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 30 15:12:23 PST 2025
mshockwave wrote:
> I tested this change on [Raspberry Pi Pico 2](https://www.raspberrypi.com/products/rp2350/) ([Hazard3 RISC-V core](https://github.com/Wren6991/Hazard3)) using [CoreMark](https://github.com/eembc/coremark) and compared the performance of different scheduling models for `-mtune=generic-rv32`:
>
> * With the `NoSchedModel` the score is 438.58.
> * With the `SpacemitX60Model` the score is 428.58.
> * With the `RocketModel` the score is 432.36.
>
> These results show that on this particular core and with this particular benchmark the SpacemitX60 scheduling model regresses performance by roughly 2.3% over no scheduling model (the Rocket scheduling model regresses performance by roughly 1.4% over no scheduling model).
>
> The compiler flags I used were: `--target=riscv32-unknown-elf -march=rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb -mabi=ilp32 -O3`.
>
> Let me know if you'd like to me to try different flags or additional benchmarks.
Thank you for running the experiments! Personally I am not super concerned about this regression, both because its quantity (~2%) and the fact that SpacemitX60's model is not tailored for embedded processors so this is more or less expected. These numbers could be a good evidence that we might need a separate generic tuning processor for embedded workloads in the future, as we also mentioned in the documentation.
That being said, I would like to known whether you're particularly concerned by this regression?
https://github.com/llvm/llvm-project/pull/167008
More information about the llvm-commits
mailing list