This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to avoid de-optimization
- To: gcc at gcc dot gnu dot org
- Subject: How to avoid de-optimization
- From: Frank Klemm <pfk at fuchs dot offl dot uni-jena dot de>
- Date: Sat, 25 Aug 2001 21:02:35 +0200
- >Received: (from pfk@localhost)by fuchs.offl.uni-jena.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id VAA14143for gcc@gcc.gnu.org; Sat, 25 Aug 2001 21:02:35 +0200
How to avoid the silly MUL => ADD+SHIFT conversation?
This nearly always increases code size (so it should be disabled with -Os)
and also decreases speed for CPU build since 1998. It only increases speed
on CPUs like 386 and 486. On K6, Pentium II, Pentium III, Athlon, Duron
a SIMPLE 'imul' is much faster and shorter (2 CPU clocks instead of 1...15
clocks).
gcc contains a lot of optimzations which are actually de-optimizations.
--
Frank Klemm