Any trick to avoid code bloat with tail call optimization?

Kazu Hirata kazu@cs.umass.edu
Sat Apr 5 09:00:00 GMT 2003


Hi,

I have a question about the sibling/tail call optimization.  How does
one avoid code bloat when a function 1) must restore several registers
in an epilogue and 2) has multiple tail calls within the function?
The tail call optimization is done quite early in the series of RTL
optimizations, so TARGET_FUNCTION_OK_FOR_SIBCALL does not know what an
epilogue will look like.  Is there a convenient way to get the number
of tail calls within a function?

Thanks,

Kazu Hirata



More information about the Gcc mailing list