Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-20 Thread Martin Liška
On 01/19/2017 04:10 PM, Jan Hubicka wrote: 2016-12-19 Martin Liska * cgraphclones.c (cgraph_node::create_virtual_clone): Create either IPA_REF_LOAD of IPA_REF_READ depending on whether new_tree is a VAR_DECL or an ADDR_EXPR. * ipa-cp.c (create_specialize

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Jan Hubicka
> >> 2016-12-19 Martin Liska > >> > >>* cgraphclones.c (cgraph_node::create_virtual_clone): > >>Create either IPA_REF_LOAD of IPA_REF_READ depending on > >>whether new_tree is a VAR_DECL or an ADDR_EXPR. > >>* ipa-cp.c (create_specialized_node): Add reference just for > >>ADD

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Martin Liška
On 01/18/2017 11:18 PM, Jan Hubicka wrote: >> >> 2016-12-19 Martin Liska >> >> * cgraphclones.c (cgraph_node::create_virtual_clone): >> Create either IPA_REF_LOAD of IPA_REF_READ depending on >> whether new_tree is a VAR_DECL or an ADDR_EXPR. >> * ipa-cp.c (create_specialized

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-18 Thread Jan Hubicka
> > 2016-12-19 Martin Liska > > * cgraphclones.c (cgraph_node::create_virtual_clone): > Create either IPA_REF_LOAD of IPA_REF_READ depending on > whether new_tree is a VAR_DECL or an ADDR_EXPR. > * ipa-cp.c (create_specialized_node): Add reference just for > ADDR_

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-10 Thread Martin Liška
PING^1 On 12/20/2016 03:55 PM, Martin Liška wrote: On 12/20/2016 11:06 AM, Martin Jambor wrote: ...this test should be for ADDR_EXPR here. Or you could switch the IPA_REF_* constants the other way round which I bet is going to have the same effect in practice, but personally, I'd test for ADDR

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2016-12-20 Thread Martin Liška
On 12/20/2016 11:06 AM, Martin Jambor wrote: > ...this test should be for ADDR_EXPR here. Or you could switch the > IPA_REF_* constants the other way round which I bet is going to have > the same effect in practice, but personally, I'd test for ADDR_EXPR. Thanks for the note, fixed (and tested in

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2016-12-20 Thread Martin Jambor
Hi, On Mon, Dec 19, 2016 at 11:09:52AM +0100, Martin Liska wrote: > Hello. > > Building mariadb with -flto exposes a bug which I also used to see > in Firefox. It's caused by IPA CP starting from r236418, where the > pass started to propagate const VAR_DECLs. Problem is that the pass > does not u

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2016-12-19 Thread Jakub Jelinek
Hi! Just a nit, defer actual review to Honza or Richard. On Mon, Dec 19, 2016 at 11:09:52AM +0100, Martin Liška wrote: > + ipa_ref_use use_type > + = TREE_CODE (map->new_tree) == VAR_DECL ? IPA_REF_ADDR : IPA_REF_LOAD; = VAR_P (map->new_tree) ? IPA_REF_ADDR : IPA_REF_LOAD. pleas