[Libre-soc-dev] Compressed instructions (was: Re: [libre-soc-dev] Alex Oliva's intro, and RFC on mission)

Lauri Kasanen cand at gmx.com
Sat Nov 21 08:49:22 GMT 2020

On Sat, 21 Nov 2020 01:45:22 -0300
Alexandre Oliva <oliva at gnu.org> wrote:

> (gcc does thumb on a per-function basis)
> This is very much unlike having the compiler figure out the transition
> points between the different instruction encodings inside functions, and
> then "recompile" fragments that are found to be fit for the compact
> representation.  This is such a major undertaking, and an expectation
> that a compiler will do so much work it hasn't traditionally done, that
> it reminds me of the Itanium.

This reminded me that there is predecent in LLVM. Some folks used
LLVM's optimizers on LZ-style compression. It's a hard, NP-class
problem on how to get the minimum compressed size - should I use this
dict entry but a worse one later, or maybe try another combination.

They got better compression than gzip IIRC. I couldn't find it in
google, however. It's still a directly comparable problem, the compiler
having the functional IR on one hand, and wanting to organize it best
for minimum size.

- Lauri

More information about the Libre-soc-dev mailing list