Need some opinions
Jeffrey A Law
law@hurl.cygnus.com
Tue Mar 2 14:59:00 GMT 1999
For the sibcall/tail recursion work, I'm going to need to run a mini
jump optimization pass to clean up the control flow graph (which will
make it easier to identify call sites which immediately jump to the
epilogue after the call returns).
All I need/want that jump pass to do is optimize jumps to jumps,
jumps to the next instruction and jumps around jumps.
These transformations (as far as I know) do not effect debugging and
are quite fast.
While pondering this issue it occurred to me that this mini jump pass
would also provide an intermediate step between current -O0 and -O1.
I often get requests to support running these kinds of simple opts
without performing cse, loop opts, combine, automatic register allocation,
etc.
Seems to me that since I'm going to have to "dumb" mode in jump.c to
deal with the sibcall issues anyway, that we should consider how to support
those requests.
One option would be to always run the "dumb" mode optimizer in jump.c, even
when not optimizing.
Another would be to rearrange the meaning of -O1, -O2, -O3, etc to make
space for a -O1 option which did just these simple optimizations.
A third would be to have it controlled by a flag which could be enabled
even when optimize == 0.
I'm leaning torward the last option, but wanted to hear your opinions.
Thanks,
jeff
More information about the Gcc
mailing list