avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead


From: David Brown
Subject: Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead
Date: Tue, 23 Aug 2005 14:12:57 +0200

This sounds like it will be a solid boost to code that uses many small
functions.

What would be even better would be if the compiler could take into
consideration the called function's register usage when allocating
registers.  Thus if a called function uses two or three temporary registers,
the callee function would of preference avoid using those same registers.
Obviously that would not work when the callee calls several different
functions with their own register usage, but in many cases it could avoid a
lot of extra shuffling around of registers.  It would also be a big step
towards better support for Tiny's, where register shuffling is extra costly,
and stacking impossible.

Many thanks for your work!

David




----- Original Message -----
From: "Haase Bjoern (PT-BEU/EMT) *" <address@hidden>

Benjamin Titzer wrote:

>
>Sounds to me like the design of GCC and the constraints of a particular
>calling convention do not allow it to do something smart here. I think the
>solution that would satisfy most everyone involved would be for the
>compiler to generate code that only saves the state of registers that it
>uses (and overwrites) and then restore them upon exit. This is a simple
>use-def analysis on the registers and would be simple enough to implement.

FYI, I am working on a scheme that GCC remembers for all of the functions
that it has already compiled which registers are actually clobbered so that
all other functions do not need to safe/restore the registers that are
preserved by the respective function. This could then be used also by the
prologues/epilogues for the SIGNAL/INTERRUPT functions to improve
efficiency.

This will be, however, a rather tough work, don't expect too much during the
next week.

Yours,

Björn


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list






reply via email to

[Prev in Thread] Current Thread [Next in Thread]