Re: [Patch][AVR]: Support tail calls

2011-03-22 Thread Denis Chertykov
2011/3/22 Richard Henderson : > On 03/22/2011 11:01 AM, Denis Chertykov wrote: >> Seems strange, I have a many messages from patch: >> patching file avr-protos.h >> patching file avr.md >> Hunk #1 succeeded at 2646 (offset -1 lines). >> Hunk #2 succeeded at 3234 (offset -9 lines). >> patching file

Re: [Patch][AVR]: Support tail calls

2011-03-22 Thread Richard Henderson
On 03/22/2011 11:01 AM, Denis Chertykov wrote: > Seems strange, I have a many messages from patch: > patching file avr-protos.h > patching file avr.md > Hunk #1 succeeded at 2646 (offset -1 lines). > Hunk #2 succeeded at 3234 (offset -9 lines). > patching file avr.c > Hunk #2 succeeded at 250 with

Re: [Patch][AVR]: Support tail calls

2011-03-22 Thread Denis Chertykov
2011/3/21 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/3/18 Georg-Johann Lay : >> Is it tested for regressions ? Denis. >>> I ran tests against svn 170942 (latest 4.7.0 snapshot). Besides >>> timestamps, the diff looks like this: >>> >>> 1435a1436,1437 XPASS: gcc.dg/sib

Re: [Patch][AVR]: Support tail calls

2011-03-21 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/3/18 Georg-Johann Lay : > >>> Is it tested for regressions ? >>> >>> Denis. >> I ran tests against svn 170942 (latest 4.7.0 snapshot). Besides >> timestamps, the diff looks like this: >> >> 1435a1436,1437 >>> XPASS: gcc.dg/sibcall-3.c execution test >>> XPASS: gcc.d

Re: [Patch][AVR]: Support tail calls

2011-03-18 Thread Denis Chertykov
2011/3/18 Georg-Johann Lay : >> Is it tested for regressions ? >> >> Denis. > > I ran tests against svn 170942 (latest 4.7.0 snapshot). Besides > timestamps, the diff looks like this: > > 1435a1436,1437 >> XPASS: gcc.dg/sibcall-3.c execution test >> XPASS: gcc.dg/sibcall-4.c execution test > 1630,

Re: [Patch][AVR]: Support tail calls

2011-03-18 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/3/16 Georg-Johann Lay >> Richard Henderson schrieb: >>> On 03/16/2011 03:32 AM, Georg-Johann Lay wrote: >>> Richard Henderson schrieb: > On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: > >> I did not find a way to make this work together wit

Re: [Patch][AVR]: Support tail calls

2011-03-17 Thread Denis Chertykov
2011/3/16 Georg-Johann Lay > > Richard Henderson schrieb: >> >> On 03/16/2011 03:32 AM, Georg-Johann Lay wrote: >> >>> Richard Henderson schrieb: >>> On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: > I did not find a way to make this work together with -mcall-prologues. > Please

Re: [Patch][AVR]: Support tail calls

2011-03-16 Thread Georg-Johann Lay
Richard Henderson schrieb: On 03/16/2011 03:32 AM, Georg-Johann Lay wrote: Richard Henderson schrieb: On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: I did not find a way to make this work together with -mcall-prologues. Please let me know if you have suggestion on how call prologues can be

Re: [Patch][AVR]: Support tail calls

2011-03-16 Thread Richard Henderson
On 03/16/2011 03:32 AM, Georg-Johann Lay wrote: > Richard Henderson schrieb: >> On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: >>> I did not find a way to make this work together with -mcall-prologues. >>> Please let me know if you have suggestion on how call prologues can be >>> combine with tail

Re: [Patch][AVR]: Support tail calls

2011-03-16 Thread Georg-Johann Lay
Richard Henderson schrieb: > On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: >> I did not find a way to make this work together with -mcall-prologues. >> Please let me know if you have suggestion on how call prologues can be >> combine with tail calls. > > You need a new symbol in libgcc for this.

Re: [Patch][AVR]: Support tail calls

2011-03-15 Thread Richard Henderson
On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: > I did not find a way to make this work together with -mcall-prologues. > Please let me know if you have suggestion on how call prologues can be > combine with tail calls. You need a new symbol in libgcc for this. It should be easy enough to have t

RE: [Patch][AVR]: Support tail calls

2011-03-15 Thread Boyapati, Anitha
> >Boyapati, Anitha schrieb: > >> To be on same page, can you explain how gcc optimizes above case? > >in > >void bar0 (void); >int bar1 (int); > >int foo (int x) >{ >bar0(); >return bar1 (x); >} > >x must be saved somewhere. avr-gcc choses Y. >Compiled -Os -mmcu=atmega8 -fno-optimize-sibl

Re: [Patch][AVR]: Support tail calls

2011-03-14 Thread Georg-Johann Lay
Boyapati, Anitha schrieb: > To be on same page, can you explain how gcc optimizes above case? in void bar0 (void); int bar1 (int); int foo (int x) { bar0(); return bar1 (x); } x must be saved somewhere. avr-gcc choses Y. Compiled -Os -mmcu=atmega8 -fno-optimize-sibling-calls reads foo

RE: [Patch][AVR]: Support tail calls

2011-03-13 Thread Boyapati, Anitha
Hi Georg, >This is a patch to test/review/comment on. It adds tail call >optimization to avr backend. > >The implementation uses struct machine_function to pass information >around, i.e. from avr_function_arg_advance to avr_function_ok_for_sibcall. > >Tail call support is more general than avr-ld

RE: [Patch][AVR]: Support tail calls

2011-03-11 Thread Weddington, Eric
> -Original Message- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Friday, March 11, 2011 7:59 AM > To: Weddington, Eric > Cc: gcc-patches@gcc.gnu.org; Denis Chertykov; Anatoly Sokolov; Boyapati, > Anitha; Joerg Wunsch > Subject: Re: [Patch][AVR]: Support

Re: [Patch][AVR]: Support tail calls

2011-03-11 Thread Georg-Johann Lay
Weddington, Eric schrieb: > >> -Original Message- >> From: Georg-Johann Lay [mailto:a...@gjlay.de] >> Sent: Friday, March 11, 2011 6:44 AM >> To: gcc-patches@gcc.gnu.org >> Cc: Denis Chertykov; Anatoly Sokolov; Weddington, Eric; Boyapati, Anitha >> Subject: [Patch][AVR]: Support tail calls

RE: [Patch][AVR]: Support tail calls

2011-03-11 Thread Weddington, Eric
> -Original Message- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Friday, March 11, 2011 6:44 AM > To: gcc-patches@gcc.gnu.org > Cc: Denis Chertykov; Anatoly Sokolov; Weddington, Eric; Boyapati, Anitha > Subject: [Patch][AVR]: Support tail calls > > This is a patch to test/rev