]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/97623 - avoid excessive insert iteration for hoisting
authorRichard Biener <rguenther@suse.de>
Fri, 30 Oct 2020 12:32:32 +0000 (13:32 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 11 Jan 2021 13:34:22 +0000 (14:34 +0100)
commit0fd6247a3014038af349db3a01748b5dc17d87a0
tree31a4c0a03bb4914201ab071d17eea1769614d38f
parentfd02aeeab1c8d3267e10dfce566cab0bdd29438e
tree-optimization/97623 - avoid excessive insert iteration for hoisting

This avoids requiring insert iteration for back-to-back hoisting
opportunities as seen in the added testcase.  For the PR at hand
this halves the number of insert iterations retaining only
the hard to avoid PRE / hoist insert back-to-backs.

2020-10-30  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97623
* tree-ssa-pre.c (insert): First do hoist insertion in
a backward walk.

* gcc.dg/tree-ssa/ssa-hoist-7.c: New testcase.

(cherry picked from commit 82ff7e3426ea926d090777173977f8bedd086816)
gcc/testsuite/gcc.dg/tree-ssa/ssa-hoist-7.c [new file with mode: 0644]
gcc/tree-ssa-pre.c