Improve LIM fill_always_executed_in computation
authorRichard Biener <rguenther@suse.de>
Thu, 9 Sep 2021 09:50:20 +0000 (11:50 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 9 Sep 2021 09:50:20 +0000 (11:50 +0200)
commit013cfc648405a8a118d07436f103e4d70224fe00
treeca468ff6558e0211fbeda33517a6f71a7933d5b0
parent6e27bc2b885207d51500b2c42f949ca5073dbe72
Improve LIM fill_always_executed_in computation

Currently the DOM walk over a loop body does not walk into not
always executed subloops to avoid scalability issues since doing
so makes the walk quadratic in the loop depth.  It turns out this
is not an issue in practice and even with a loop depth of 1800
this function is way off the radar.

So the following patch removes the limitation, replacing it with
a comment.

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

* tree-ssa-loop-im.c (fill_always_executed_in_1): Walk
into all subloops.

* gcc.dg/tree-ssa/ssa-lim-17.c: New testcase.
gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-17.c [new file with mode: 0644]
gcc/tree-ssa-loop-im.c