[PATCH] Fix PR90930

Richard Biener rguenther@suse.de
Fri Jun 21 16:20:00 GMT 2019


On June 21, 2019 5:50:45 PM GMT+02:00, Jakub Jelinek <jakub@redhat.com> wrote:
>On Fri, Jun 21, 2019 at 04:17:13PM +0200, Richard Biener wrote:
>> 
>> The following fixes a quadraticness in reassoc.
>> 
>> Bootstrap / regtest running on x86_64-unknown-linux-gnu.
>
>build_and_add_sum has several other callers, don't they need a similar
>change (or better do the gimple_set_visited (sum, true); inside of
>build_and_add_sum)?

I didn't review them and thus wanted to only affect the caller I know is problematic. Other callers might still Form unrelated chains? 

Richard. 

>> 2019-06-21  Richard Biener  <rguenther@suse.de>
>> 
>> 	PR tree-optimization/90930
>> 	* tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Set visited
>> 	flag on new stmts to avoid re-processing them.
>> 
>> Index: gcc/tree-ssa-reassoc.c
>> ===================================================================
>> --- gcc/tree-ssa-reassoc.c	(revision 272384)
>> +++ gcc/tree-ssa-reassoc.c	(working copy)
>> @@ -4812,6 +4812,7 @@ rewrite_expr_tree_parallel (gassign *stm
>>        else
>>  	{
>>  	  stmts[i] = build_and_add_sum (TREE_TYPE (last_rhs1), op1, op2,
>opcode);
>> +	  gimple_set_visited (stmts[i], true);
>>  	}
>>        if (dump_file && (dump_flags & TDF_DETAILS))
>>  	{
>
>	Jakub



More information about the Gcc-patches mailing list