First, if this is no longer the appropriate group for this discussion,
please tell me where to send it.
I've been working to understand all the comments here. From them, I think:
1. It's OK to have gcc report back to the user whether each particular
call in tail position is optimized when -foptimize-sibling-calls is set
as a compiler option; or, to report only those calls that have not been
optimized.
2. Given (1), the question is what form that information should take,
and which gcc option should cause it to be expressed.
From comments in this thread and the documentation for today's mainline
gcc, I configured and built Gambit Scheme with
./configure CC="/pkgs/gcc-mainline/bin/gcc -fopt-info-missed"
--enable-single-host
thinking that info about missed optimizations would be a good place to
export information about non-optimized sibling calls.
This may not have been a good idea, however, as I ended up with 93367
lines about missed optimizations.
Is this the right direction to proceed in? The documentation says about
-fopt-info-missed
One or more of the following option keywords can be used to
describe a group of optimizations:
'ipa'
Enable dumps from all interprocedural optimizations.
'loop'
Enable dumps from all loop optimizations.
'inline'
Enable dumps from all inlining optimizations.
'omp'
Enable dumps from all OMP (Offloading and Multi Processing)
optimizations.
'vec'
Enable dumps from all vectorization optimizations.
'optall'
Enable dumps from all optimizations. This is a superset of
the optimization groups listed above.
I'd like to limit the number of missed optimization warnings, but I
don't know where sibling call optimization would fit into these categories.
Brad