Re^2: Oh noooooo!!
David E. Wallace
wallace at hpdtl.HP.COM
Fri Sep 29 03:49:13 AEST 1989
In article <14052 at lanl.gov>, jlg at lanl.gov (Jim Giles) writes:
> This jump is allowed by C but not by Fortran. In fact, even the
...
> So, the optimizer for C _cannot_ be any simpler than that for
> Fortran.
Sure it can. Just turn off flow-based optimization for any program unit that
contains a goto (or that contains a backwards goto, or that contains a goto
that is not trivially recognizeable as a loop exit, or whatever).
Since 99.999% of all C program units contain no gotos, this is a perfectly
viable option for a C compiler. The same cannot be said of Fortran: any
Fortran optimizer that followed this strategy would find that it wasn't doing
enough optimization to be generally useful.
Dave W.
More information about the Comp.lang.c
mailing list