1. If "f" calls "sin", and "f" is compiled with -fno-builtin-sin, and
"g" calls "f", and "g" is compiled with -fbuiltin-sin, should we perform
builtin optimizations?
2. If "f" calls "sin" and was compiled without optimization (e.g., "-g")
but, now, at LTO-time, is compiled with "-O2", should we perform
builtin optimizations?
I think that for (1), it makes sense not to optimize, but for (2) it
makes more sense to optimize. But, I also think your suggestion is
reasonable, and it does have the advantage of seeming simplest to reason
about.