This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19597] [4.0 Regression] avr-gcc 4.0, multiplication by constant, very long code
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2005 23:19:59 -0000
- Subject: [Bug target/19597] [4.0 Regression] avr-gcc 4.0, multiplication by constant, very long code
- References: <20050123225538.19597.dmixm@marine.febras.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schlie at comcast dot net 2005-01-25 23:19 -------
(In reply to comment #11)
> The change described above should avoid AVR keeping HImode integer constants
> in registers and then copying them when required (its as cheap to load an
> immediate constant as it is to copy registers, but the later increases register
> pressure, stack frame size, etc...)
Just as a minor clarification, HI-mode register-to-register moves are relativly cheap on avr
(i.e. 1-instruction/1-cycle if allocated in an register pair), so there may often be circumstances
when keeping frequently-recently used HI constants in registers may actually be cheaper than
loading them upon demand (as QI-mode constant loads are limited to r16-r31), and although
an HI-mode constant may be arbitrarity loaded from data-memory, they would need to have
been stored there first in anticipation of their requirement, unfortunatly further complecated
by data-memory itself tending to be a very scarce/limited resource (nor is it clear how to best
express this potential method or cost to GCC if considered worth while)?
(however, more accurrately describing true inst. costs should only help improve code effeciency)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19597