Re: [PATCH PR95638]Record/restore postorder, rather than update it

2020-06-15 Thread Richard Biener via Gcc-patches
On Mon, Jun 15, 2020 at 12:04 PM bin.cheng via Gcc-patches
 wrote:
>
> Hi,
> This simple patch fixes wrong code issue as reported.  I tried to update 
> postorder information after
> the second call to graphds_scc with alias dependence edges skipped.  This 
> wasn't working, and I
> realize it's hard to do.  This patch simply records postorder information 
> before the call and restores
> after.  It also fixes memory leak.
>
> Bootstrap and test on x86_64. Comments?

I don't see any obvious more clever thing to do thus OK.

Thanks,
Richard.

> Thanks,
> bin
>
> 2020-06-15  Bin Cheng  
>
> gcc/
> PR tree-optimization/95638
> * tree-loop-distribution.c (pg_edge_callback_data): New field.
> (loop_distribution::break_alias_scc_partitions): Record and 
> restore
> postorder information.  Fix memory leak.
>
> gcc/testsuite/
> PR tree-optimization/95638
> * g++.dg/tree-ssa/pr95638.C: New test.


[PATCH PR95638]Record/restore postorder, rather than update it

2020-06-15 Thread bin.cheng via Gcc-patches
Hi,
This simple patch fixes wrong code issue as reported.  I tried to update 
postorder information after
the second call to graphds_scc with alias dependence edges skipped.  This 
wasn't working, and I
realize it's hard to do.  This patch simply records postorder information 
before the call and restores
after.  It also fixes memory leak.

Bootstrap and test on x86_64. Comments?

Thanks,
bin

2020-06-15  Bin Cheng  

gcc/
PR tree-optimization/95638
* tree-loop-distribution.c (pg_edge_callback_data): New field.
(loop_distribution::break_alias_scc_partitions): Record and restore
postorder information.  Fix memory leak.

gcc/testsuite/
PR tree-optimization/95638
* g++.dg/tree-ssa/pr95638.C: New test.

pr95638.txt
Description: Binary data