Gotos and Labels in egcs/gcc2/gcc1
Jeffrey A Law
law@cygnus.com
Sun Sep 28 18:35:00 GMT 1997
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
More information about the Gcc
mailing list