Re: [PATCH] Fix PR56888

2017-02-16 Thread Jan Hubicka
> On Tue, Feb 23, 2016 at 12:32 PM, Richard Biener wrote: > > On Tue, 23 Feb 2016, Jan Hubicka wrote: > > > >> > > >> > Ok, so maybe a better question to symtab would be if there is an > >> > actual definition for what __builtin_FOO will call. Not really > >> > whether that definition is cfun. O

Re: [PATCH] Fix PR56888

2017-02-14 Thread Richard Biener
On Tue, Feb 23, 2016 at 12:32 PM, Richard Biener wrote: > On Tue, 23 Feb 2016, Jan Hubicka wrote: > >> > >> > Ok, so maybe a better question to symtab would be if there is an >> > actual definition for what __builtin_FOO will call. Not really >> > whether that definition is cfun. Of course all t

Re: [PATCH] Fix PR56888

2016-02-23 Thread Richard Biener
On Tue, 23 Feb 2016, Jan Hubicka wrote: > > > > Ok, so maybe a better question to symtab would be if there is an > > actual definition for what __builtin_FOO will call. Not really > > whether that definition is cfun. Of course all the fortify > > always-inline wrappers should not count as such

Re: [PATCH] Fix PR56888

2016-02-23 Thread Jan Hubicka
> > Ok, so maybe a better question to symtab would be if there is an > actual definition for what __builtin_FOO will call. Not really > whether that definition is cfun. Of course all the fortify > always-inline wrappers should not count as such (just in case > the symtab code is confused about t

Re: [PATCH] Fix PR56888

2016-02-23 Thread Jan Hubicka
> On Mon, 22 Feb 2016, Jakub Jelinek wrote: > > > On Mon, Feb 22, 2016 at 01:44:09PM +0100, Richard Biener wrote: > > > --- 1079,1086 > > > || !dominated_by_p (CDI_DOMINATORS, > > > loop->latch, gimple_bb (stmt))) > > > return; > > > +

Re: [PATCH] Fix PR56888

2016-02-22 Thread Richard Biener
On Mon, 22 Feb 2016, Richard Biener wrote: > On Mon, 22 Feb 2016, Jakub Jelinek wrote: > > > On Mon, Feb 22, 2016 at 01:44:09PM +0100, Richard Biener wrote: > > > --- 1079,1086 > > > || !dominated_by_p (CDI_DOMINATORS, > > > loop->latch, gimple_bb

Re: [PATCH] Fix PR56888

2016-02-22 Thread Richard Biener
On Mon, 22 Feb 2016, Jakub Jelinek wrote: > On Mon, Feb 22, 2016 at 01:44:09PM +0100, Richard Biener wrote: > > --- 1079,1086 > > || !dominated_by_p (CDI_DOMINATORS, > > loop->latch, gimple_bb (stmt))) > > return; > > + if (cgraph_node::get (cfun->dec

Re: [PATCH] Fix PR56888

2016-02-22 Thread Jakub Jelinek
On Mon, Feb 22, 2016 at 01:44:09PM +0100, Richard Biener wrote: > --- 1079,1086 > || !dominated_by_p (CDI_DOMINATORS, > loop->latch, gimple_bb (stmt))) > return; > + if (cgraph_node::get (cfun->decl)->aliases (BUILT_IN_MEMSET)) > + return; P

[PATCH] Fix PR56888

2016-02-22 Thread Richard Biener
The following fixes us to not transform loops into memcpy or memset or not transform malloc + memset into calloc if we implement that functionality itself (and thus we "alias" the symbol we'd call when emitting a call to the builtin). Bootstrap and regtest pending on x86_64-unknown-linux-gnu. Th