From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20491 invoked by alias); 21 Oct 2002 15:23:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 20480 invoked from network); 21 Oct 2002 15:23:15 -0000 Received: from unknown (HELO web21110.mail.yahoo.com) (216.136.227.112) by sources.redhat.com with SMTP; 21 Oct 2002 15:23:15 -0000 Message-ID: <20021021152314.44588.qmail@web21110.mail.yahoo.com> Received: from [24.43.180.37] by web21110.mail.yahoo.com via HTTP; Mon, 21 Oct 2002 08:23:14 PDT Date: Mon, 21 Oct 2002 11:01:00 -0000 From: Joe Wilson Subject: Re: abysmal code generated by gcc 3.2 To: Denys Duchier Cc: gcc@gcc.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg01251.txt.bz2 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 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 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/