Skip to content

PGO/LTO optimizations for riscv qemu platforms#29

Merged
psilva261 merged 7 commits intomasterfrom
psilva261/w2c2-qemu-user-pgo
Apr 27, 2026
Merged

PGO/LTO optimizations for riscv qemu platforms#29
psilva261 merged 7 commits intomasterfrom
psilva261/w2c2-qemu-user-pgo

Conversation

@psilva261
Copy link
Copy Markdown
Collaborator

@psilva261 psilva261 commented Mar 22, 2026

  • additional Docker stage riscv-gnu-glibc-clang-installer
  • time-based PGO (instead of step-based as in current measurements)
  • stateless improves from 2147554329 steps without LTO/PGO to 1993332842 steps (7%)

PGO explicitly takes time measurements to decide which improvements to do. So the current optimization might be skewed, also being related to #20

For simplicity the GCC RISC-V project provides a clang version with PGO enabled. And most importantly with the compiler-rt profile library. For baremetal riscv64 soft-float a custom compiled clang would be needed though. This is realized through the GCC RISC-V build.

It's not part of benchmarking though because RAM usage is too high for the Runner even with lld

* additional Docker stage riscv-gnu-glibc-clang-installer
* time-based PGO (instead of step-based as in current
  measurements)
* stateless improves from 2147554329 steps without LTO/PGO
  to 1993332842 steps (7%)
@github-actions
Copy link
Copy Markdown

Benchmark Results (933ad25)

Language native w2c2-O0 w2c2-O3 wamr wasmer wasmtime
stateless 234645576 6025861928 2047910014 2324683355 950102274 866364984
reva-client-eth 387749987 4472368224 1312933781 1956872604 N/A 1028145139

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

Benchmark Results (044b762)

Language native w2c2-O0 w2c2-O3 wamr wasmer wasmtime
stateless 234627193 6024820294 2047934762 2324683355 950199779 866981628
reva-client-eth 387768463 4469875228 1310452610 1956872604 N/A 1028129750

@psilva261 psilva261 changed the title PGO/LTO optimizations for riscv-qemu-user platform PGO/LTO optimizations for riscv qemu platforms Apr 3, 2026
@psilva261
Copy link
Copy Markdown
Collaborator Author

I think I'll merge this for now. The way it's implemented, PGO/LTO are anyway optional

@psilva261 psilva261 merged commit 3c86ab2 into master Apr 27, 2026
1 check passed
@psilva261 psilva261 deleted the psilva261/w2c2-qemu-user-pgo branch April 27, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant