This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: abysmal code generated by gcc 3.2
- From: Joe Wilson <developir at yahoo dot com>
- To: Denys Duchier <Denys dot Duchier at ps dot uni-sb dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 21 Oct 2002 08:23:14 -0700 (PDT)
- Subject: Re: abysmal code generated by gcc 3.2
My mistake. I did not see the cross-jump in the -O3 -finline-limit case.
If you follow the jumps you have many more instructions for MOVEXX.
-O2 does produce "optimal" code, though.
How does one disable these cross-jumps (if that's the correct term) in GCC 3.2?
--- Joe Wilson <developir@yahoo.com> wrote:
> The following GCC 3.2 flags:
>
> -S -fno-exceptions -O3 -pipe -fstrict-aliasing -march=pentium -mcpu=pentiumpro
> -fomit-frame-pointer emulate.ii -finline-limit=10000000
>
> also produce:
>
> MOVEXX:
> /NO_APP
> movl 4(%ebp), %esi
> movl 8(%ebp), %eax
> movl (%esi), %ebx
> movl %ebx, (%eax)
> L6530:
> addl $12, %ebp
> jmp L6288
>
> Using -O2 with the default inline limit produces comparable results as well.
>
> --- Denys Duchier <Denys.Duchier@ps.uni-sb.de> wrote:
> > As I mentioned to Brad Lucier (pc), it seems that the poor code
> > generation is somehow triggered in connection with inlining. IIRC (I
> > have tried so many variations) If I supply -fno-inline-functions then
> > indeed I get the code above. This very marginally improves straight
> > emulated recursion, but degrades the rest of the emulated
> > instructions. Overall, its a loss. Any further lowering of the
> > optimization level also leads to a degradation in performance.
>
>
> __________________________________________________
> Do you Yahoo!?
> Y! Web Hosting - Let the expert host your web site
> http://webhosting.yahoo.com/
>
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/