]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/97623 - Avoid PRE hoist insertion iteration
authorRichard Biener <rguenther@suse.de>
Tue, 3 Nov 2020 14:03:41 +0000 (15:03 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 11 Jan 2021 13:36:07 +0000 (14:36 +0100)
commiteddcb627ccfbd97e025cf366cc3f3bad76211785
treeeddc55ef7c6e92b8ed114b3b89a11687a56cbc0c
parent0fd6247a3014038af349db3a01748b5dc17d87a0
tree-optimization/97623 - Avoid PRE hoist insertion iteration

We are not really interested in PRE opportunities exposed by
hoisting but only the other way around.  So this moves hoist
insertion after PRE iteration finished and removes hoist
insertion iteration alltogether.

It also guards access to NEW_SETS properly.

2020-11-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97623
* tree-ssa-pre.c (insert): Move hoist insertion after PRE
insertion iteration and do not iterate it.
(create_expression_by_pieces): Guard NEW_SETS access.
(insert_into_preds_of_block): Likewise.

* gcc.dg/tree-ssa/ssa-hoist-3.c: Adjust.
* gcc.dg/tree-ssa/ssa-hoist-7.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-30.c: Likewise.
gcc/testsuite/gcc.dg/tree-ssa/ssa-hoist-3.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-hoist-7.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-30.c
gcc/tree-ssa-pre.c