Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-09 Thread Richard Biener
On Mon, 8 Dec 2014, Joseph Myers wrote: > On Mon, 8 Dec 2014, Richard Biener wrote: > > > The alternative is to decide "used" in the middle-end at one point, > > for example at the end of all_lowering_passes where hopefully > > we have constant folded and removed dead code enough. We can also >

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Joseph Myers
On Mon, 8 Dec 2014, Richard Biener wrote: > The alternative is to decide "used" in the middle-end at one point, > for example at the end of all_lowering_passes where hopefully > we have constant folded and removed dead code enough. We can also > compute an overall "uses libm" flag to fix the test

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Joseph Myers
On Mon, 8 Dec 2014, Richard Biener wrote: > I'm not pushing this further for stage3, but for stage1 I'd like > to eventually address this by splitting up builtin_info_type's > 'implicit_p' into a flags array providing implicit_p, declared_p, > used_p and maybe declared_in_system_header_p. Would y

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Jakub Jelinek
On Mon, Dec 08, 2014 at 01:54:21PM +0100, Richard Biener wrote: > On Mon, 8 Dec 2014, Jakub Jelinek wrote: > > > On Mon, Dec 08, 2014 at 01:24:12PM +0100, Richard Biener wrote: > > > I'm not pushing this further for stage3, but for stage1 I'd like > > > to eventually address this by splitting up b

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Richard Biener
On Mon, 8 Dec 2014, Jakub Jelinek wrote: > On Mon, Dec 08, 2014 at 01:24:12PM +0100, Richard Biener wrote: > > I'm not pushing this further for stage3, but for stage1 I'd like > > to eventually address this by splitting up builtin_info_type's > > 'implicit_p' into a flags array providing implicit_

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Jakub Jelinek
On Mon, Dec 08, 2014 at 01:24:12PM +0100, Richard Biener wrote: > I'm not pushing this further for stage3, but for stage1 I'd like > to eventually address this by splitting up builtin_info_type's > 'implicit_p' into a flags array providing implicit_p, declared_p, > used_p and maybe declared_in_syst

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Richard Biener
On Thu, 4 Dec 2014, Joseph Myers wrote: > On Thu, 4 Dec 2014, Richard Biener wrote: > > > OTOH this also means the user cannot provide a conforming > > implementation on his own and get that used by GCC without editing > > system headers or including a header with -isystem or similar > > tricks.

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: > OTOH this also means the user cannot provide a conforming > implementation on his own and get that used by GCC without editing > system headers or including a header with -isystem or similar > tricks. Well - you could have a pragma / attribute for that

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Richard Biener
On Thu, 4 Dec 2014, Joseph Myers wrote: > On Thu, 4 Dec 2014, Richard Biener wrote: > > > So what does this all mean in practice for optimization passes? > > I don't know what it means in terms of how to fix the various existing > problems - it's simply how I think a fixed compiler should behav

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: > So what does this all mean in practice for optimization passes? I don't know what it means in terms of how to fix the various existing problems - it's simply how I think a fixed compiler should behave. > When b) does not apply then the given stpcpy sp

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Richard Biener
On Thu, 4 Dec 2014, Joseph Myers wrote: > On Thu, 4 Dec 2014, Richard Biener wrote: > > > Currently even when I prototype > > > > double exp10 (double); > > > > this function is not available to optimizers for code generation if > > they just check for builtin_decl_implicit (BUILT_IN_EXP10). >

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: > Currently even when I prototype > > double exp10 (double); > > this function is not available to optimizers for code generation if > they just check for builtin_decl_implicit (BUILT_IN_EXP10). > Curiously though the function is identified as BUILT_IN_E

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Jason Merrill
OK. Jason

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Alexander Monakov
On Thu, 4 Dec 2014, Richard Biener wrote: > > Currently even when I prototype > > double exp10 (double); > > this function is not available to optimizers for code generation if > they just check for builtin_decl_implicit (BUILT_IN_EXP10). > Curiously though the function is identified as BUILT_I

[PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Richard Biener
Currently even when I prototype double exp10 (double); this function is not available to optimizers for code generation if they just check for builtin_decl_implicit (BUILT_IN_EXP10). Curiously though the function is identified as BUILT_IN_EXP10 when used though, thus the middle-end assumes it ha