This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lto] make builtins go



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.

I don't think my suggestion prevents optimizing (2). :-) In the (2) case __builtin_sin will be serialized out (because -O0 does not imply -fno-builtin), read in by LTO, and optimize.


Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]