[PATCH,bionic] Add -foptimize-sincos

2013-05-24 Thread Andrew Hsieh
Bionic prior to Gingerbread doesn't support sincos*, but upstream GCC enables sincos optimization for OPTION_BIONIC unconditionally since 4.6. I'd like to propose a new flag -foptimize-sincos for NDK to maintain backward compatibility. 1. For BIONIC: sincos optimization is disabled by default.

Re: [PATCH,bionic] Add -foptimize-sincos

2013-05-24 Thread Richard Biener
On Fri, May 24, 2013 at 12:53 PM, Andrew Hsieh andrewhs...@google.com wrote: Bionic prior to Gingerbread doesn't support sincos*, but upstream GCC enables sincos optimization for OPTION_BIONIC unconditionally since 4.6. I'd like to propose a new flag -foptimize-sincos for NDK to maintain

Re: [PATCH,bionic] Add -foptimize-sincos

2013-05-24 Thread Jakub Jelinek
On Fri, May 24, 2013 at 02:10:18PM +0200, Richard Biener wrote: That's a pretty awful option name for one that makes us assume the target C library has a sincos function. I'd rather think about a way to specify, for all known builtins, whether GCC should generate calls to such function where

Re: [PATCH,bionic] Add -foptimize-sincos

2013-05-24 Thread Alexander Ivchenko
Richard, the target hook (libc_has_function) for what you described is waiting for a review: http://gcc.gnu.org/ml/gcc-patches/2013-03/msg01201.html However, it doesn't have command line options support. Alexander 2013/5/24 Richard Biener richard.guent...@gmail.com: On Fri, May 24, 2013 at

Re: [PATCH,bionic] Add -foptimize-sincos

2013-05-24 Thread Richard Biener
On Fri, May 24, 2013 at 2:18 PM, Jakub Jelinek ja...@redhat.com wrote: On Fri, May 24, 2013 at 02:10:18PM +0200, Richard Biener wrote: That's a pretty awful option name for one that makes us assume the target C library has a sincos function. I'd rather think about a way to specify, for all

Re: [PATCH,bionic] Add -foptimize-sincos

2013-05-24 Thread Jakub Jelinek
On Fri, May 24, 2013 at 02:23:45PM +0200, Richard Biener wrote: But for example memset/memcpy always have that set, even if no prototype is in the source. So, is that decl_implicit_p really supposed to tell us whether we've seen a compatible prototype? decl_implicit_p isn't whether we've seen

Re: [PATCH,bionic] Add -foptimize-sincos

2013-05-24 Thread Richard Biener
On Fri, May 24, 2013 at 2:28 PM, Jakub Jelinek ja...@redhat.com wrote: On Fri, May 24, 2013 at 02:23:45PM +0200, Richard Biener wrote: But for example memset/memcpy always have that set, even if no prototype is in the source. So, is that decl_implicit_p really supposed to tell us whether