Re: [PATCH] Replace has_single_use guards in store-merging

2017-11-16 Thread Christophe Lyon
On 16 November 2017 at 11:04, Jakub Jelinek wrote: > On Thu, Nov 16, 2017 at 11:00:01AM +0100, Christophe Lyon wrote: >> I've noticed that this patch (r254579) introduces an ICE on aarch64: >> gcc.target/aarch64/vect-compile.c (internal compiler error) >> gcc.target/aarch64/vect.c (interna

Re: [PATCH] Replace has_single_use guards in store-merging

2017-11-16 Thread Jakub Jelinek
On Thu, Nov 16, 2017 at 11:00:01AM +0100, Christophe Lyon wrote: > I've noticed that this patch (r254579) introduces an ICE on aarch64: > gcc.target/aarch64/vect-compile.c (internal compiler error) > gcc.target/aarch64/vect.c (internal compiler error) That should have been fixed in r254628

Re: [PATCH] Replace has_single_use guards in store-merging

2017-11-16 Thread Christophe Lyon
Hi Jakub, On 9 November 2017 at 13:58, Richard Biener wrote: > On Wed, 8 Nov 2017, Jakub Jelinek wrote: > >> On Wed, Nov 08, 2017 at 04:20:15PM +0100, Richard Biener wrote: >> > Can't you simply use >> > >> >unsigned ret = 0; >> >FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) >> >

Re: [PATCH] Replace has_single_use guards in store-merging

2017-11-09 Thread Richard Biener
On Wed, 8 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 08, 2017 at 04:20:15PM +0100, Richard Biener wrote: > > Can't you simply use > > > >unsigned ret = 0; > >FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) > > if (!has_single_use (op)) > >++ret; > >return ret; >

Re: [PATCH] Replace has_single_use guards in store-merging

2017-11-08 Thread Jakub Jelinek
On Wed, Nov 08, 2017 at 04:20:15PM +0100, Richard Biener wrote: > Can't you simply use > >unsigned ret = 0; >FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) > if (!has_single_use (op)) >++ret; >return ret; > > ? Not sure if the bit_not_p handling is required. Con

Re: [PATCH] Replace has_single_use guards in store-merging

2017-11-08 Thread Richard Biener
On Mon, 6 Nov 2017, Jakub Jelinek wrote: > Hi! > > As mentioned earlier, the !has_single_use checks disable store merging > in many cases, it is enough to have a single multiple-use somewhere and > all of sudden we break the group. > > The following patch replaces it by heuristics, it is GIMPLE

[PATCH] Replace has_single_use guards in store-merging

2017-11-06 Thread Jakub Jelinek
Hi! As mentioned earlier, the !has_single_use checks disable store merging in many cases, it is enough to have a single multiple-use somewhere and all of sudden we break the group. The following patch replaces it by heuristics, it is GIMPLE statement count based, but I think it should work pretty