[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Urgent Queries about AVR-GCC
From: |
Neil Johnson |
Subject: |
Re: [avr-gcc-list] Urgent Queries about AVR-GCC |
Date: |
Tue, 3 Jun 2003 21:28:38 +0100 (BST) |
> I tracked down the reason, and it's the IAR optimization called
> "cross-call optimization".
More commonly known as tail-merging or cross-linking. An early example of
code factoring that, as you have found, can make a big difference. If
anyone's interested, AbsInt have developed a post-link tool called aiPop:
http://www.absint.de/aipop/
that does tail-merging and all sorts of other fun tricks. So far they
have only developed a version for the Siemens C16x/ST10 micros (obviously
aiming for the automotive market ;-)
> I don't know how hard this would be to add, and I definitely don't know
> how to do it. However, from my perspective it is "low-hanging fruit". (I
> need those 4K bytes.)
I guess one way to do it yourself is to pull out the common tails into
your own functions, and hope that GCC spots that you're doing a tail call
and converts the rcall/ret into an rjmp.
You could try it...it might work.
Cheers,
Neil
--
Neil Johnson :: Computer Laboratory :: University of Cambridge ::
http://www.njohnson.co.uk http://www.cl.cam.ac.uk/~nej22
---- IEE Cambridge Branch: http://www.iee-cambridge.org.uk ----
Re: [avr-gcc-list] Urgent Queries about AVR-GCC, E. Weddington, 2003/06/03