From: Philipp Klaus Krause <pkk@sp...> - 2012-07-07 14:00:26
-----BEGIN PGP SIGNED MESSAGE-----
Dear users and developers of sdcc,
redundancy elimination currently is one of the weaker aspects of sdcc
(it has just cse and gcse). I have implemented the AFAIK best
currently known redundancy elimination technique, lifetime-optimal
speculative partial redundancy elimination (lospre) in the lospre
branch. For more theoretical background on lospre see "A life-time
optimal algorithm for speculative PRE" by Jingling Xue and Qiong Cai.
I have implemented lospre as an additional optimization pass, after
gcse, since there are too many things interwined with the gcse code,
even though in principle lospre can do anything gcse and cse (and some
other redundancy elimination techniques) can do.
If you want to try it, you can obtain it using
In case you notice any bugs or regressions in code size compared to
the realease candidates, please report them.
The current state is as follows:
Passes all regression tests for z80-related and hc08-related ports,
giving a reduction in code size.
For mcs51 (and ds390) there is a compiler crash in 1 (3) of the
regression tests, but these are most likely bugs in the backends, not
the lospre implementation. Otherwise there is one regression failure
in mcs51 and two regression failures in ds390.
There are two new command line options related to lospre:
- --no-lospre : Disables lospre.
- --lospre-unsafe-read : Allow unsafe read optimization. This can
further reduce code size, but result in reads from random memory
locations. You should not use this option if there is memory
protection/management or memory-mapped I/O.
My current plan is to merge the lospre branch sometime next week,
after the 3.2.0 release. Due to the current problems on mcs51 and
ds390, I will disable lospre except for the z80-related and
hc08-related ports then.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----