[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [f-cpu] New suggestion about call convention
On Sat, 9 Nov 2002 21:37:24 +0000
cedric <cedric.bail@free.fr> wrote:
> > But the point is you have all the calling information.
> > It may mean a extra pass in the compiler but it can be done.
> > Also since this works best with leaf functions you could do this with
> > say three passes. pass #1 all functions with no calls or system calls
> > only. pass #2 all functions that call level #1 functions ... pass #3
> > all functions that call level #2 and #1 functions.
> > At the same time functions could be tagged for in-line macro
> > replacement. The old compile/run time trade off again.
>
> What append if my library staticaly call a function foo () that is used in my
> code by the main function.
>
> /*
> Main.c
> */
>
> static void bar () {}
> void foo () { bar (); }
>
> int main (int argc, char argv[])
> {
> libcall ();
> foo ();
> }
>
> /*
> Mylib.c
> */
>
> void libcall () { foo (); }
>
> I think that you couldn't know anything about the librairie, and you couldn't
> detect if your program use this thing or not, because it came from the
> outside...
You're right. But i thinl this case is a ill one. I hope nobody code like that !
So maybe the 20-80 rule apply. This case could not be optimised but the common one could.
nicO
>
> Cedric
> *************************************************************
> To unsubscribe, send an e-mail to majordomo@seul.org with
> unsubscribe f-cpu in the body. http://f-cpu.seul.org/
>
> __________________________________________________
> Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo !
> Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu in the body. http://f-cpu.seul.org/