]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/103188 - avoid running ranger on not-up-to-date SSA
authorRichard Biener <rguenther@suse.de>
Thu, 11 Nov 2021 13:05:49 +0000 (14:05 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 11 Nov 2021 14:01:26 +0000 (15:01 +0100)
commit8865133614f09caadf48c0b7d05f0331959b3bc1
tree504e33799e8d37fe93b9335eefb2a6b19c60bdd3
parent6e30c48120500ef2e8643a7574636ed02567dbb6
tree-optimization/103188 - avoid running ranger on not-up-to-date SSA

The following splits loop header copying into an analysis phase
that uses ranger and a transform phase that can do without to avoid
running ranger on IL that has SSA form not updated.

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

PR tree-optimization/103188
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p):
Remove query parameter, split out check for size
optimization.
(ch_base::m_ranger, cb_base::m_query): Remove.
(ch_base::copy_headers): Split processing loop into
analysis around which we allocate and use ranger and
transform where we do not.
(pass_ch::execute): Do not allocate/free ranger here.
(pass_ch_vect::execute): Likewise.

* gcc.dg/torture/pr103188.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr103188.c [new file with mode: 0644]
gcc/tree-ssa-loop-ch.c