This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gotos and Labels in egcs/gcc2/gcc1
- To: Westley Weimer <weimer at wrw3 dot resnet dot cornell dot edu>
- Subject: Re: Gotos and Labels in egcs/gcc2/gcc1
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 28 Sep 1997 19:37:45 -0600
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.LNX.3.96.970928192819.11253B-100000@wrw3.resnet.cornell.edu>you write:
> I have only a cursory knowledge of optimizing compilers, but I know that
> gotos can make it more difficult for compilers to optimize blocks of code.
> Unless I miss my guess (and it is somewhat supported by telling comments
> in the code) much of bison.simple has survived unchanged since the time of
> GCC version 1.
Jumps can make it more difficult to optimize code; however, most
compilers have code to optimize jumps. In your example, the jump
is obviously redundant and will be removed by the first jump
optimization pass and thus has no significant impact on how well
gcc can optimize the code.
Jeff