Avoid full DOM walk in LIM fill_always_executed_in
authorRichard Biener <rguenther@suse.de>
Thu, 9 Sep 2021 08:52:12 +0000 (10:52 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 9 Sep 2021 09:16:58 +0000 (11:16 +0200)
commit6e27bc2b885207d51500b2c42f949ca5073dbe72
treeb8e5f31bd8012fb603362bc9d58869ae41ea47c0
parentf77f3adebde0547ed734a260f29e5afc85dcbe49
Avoid full DOM walk in LIM fill_always_executed_in

This avoids a full DOM walk via get_loop_body_in_dom_order in the
loop body walk of fill_always_executed_in which is often terminating
the walk of a loop body early by integrating the DOM walk of
get_loop_body_in_dom_order with the actual processing done by
fill_always_executed_in.  This trades the fully populated loop
body array with a worklist allocation of the same size and thus
should be a strict improvement over the recursive approach of
get_loop_body_in_dom_order.

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

* tree-ssa-loop-im.c (fill_always_executed_in_1): Integrate
DOM walk from get_loop_body_in_dom_order using a worklist
approach.
gcc/tree-ssa-loop-im.c