[Libre-soc-dev] idea: get grant from rust foundation to add powerpc/svp64 backend to cranelift

Jacob Lifshay programmerjake at gmail.com
Sun Feb 19 18:14:19 GMT 2023


https://foundation.rust-lang.org/grants/project-grants/

they're planning on accepting grant requests again later this year.

this benefits libre-soc because it would likely be our first
production-grade compiler backend with at least some svp64 support, the
plan is cranelift is going to be a supported backend for both kazan (one of
our vulkan drivers), and is already an experimental backend for rustc. we
also benefit because rust will have a easily justifiable reason to add
svp64 support for portable-simd, supporting variable length vectors
(currently they're just depending on our intention to add svp64 support
which hasn't yet materialized, so they don't have a super good reason to
support svp64's quirks)

this benefits rust because it gets a new experimental compiler backend
(rustc already experimentally supports cranelift), and also faster powerpc
compilation in debug mode (llvm is slow).

this also benefits us and rust because we automatically get a fast wasm
engine with powerpc/svp64 support -- wasmtime.

this grant would be enough for basic powerpc/svp64 support (probably won't
be complete due to budget, but enough to compile most programs that don't
need advanced svp64 features)

steps required:
* get register allocator working for register ranges -- wip
(experimentation already under way in bigint-presentation-code.git)
* add generic variable-length vector ops to cranelift
* add powerpc instruction selection for cranelift
* add generic vector op -> svp64 instruction selection to cranelift
* tbd

I would be working on this.

Jacob


More information about the Libre-soc-dev mailing list