]> gcc.gnu.org Git - gcc.git/commit
Use correct CFG orders for DF worklist processing
authorRichard Biener <rguenther@suse.de>
Fri, 21 Apr 2023 10:02:28 +0000 (12:02 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 21 Apr 2023 11:25:39 +0000 (13:25 +0200)
commit53dddbfeb213ac4ec39f550aa81eaa4264375d2c
tree46ef921ab054da15f9642e9e96727c19975a664e
parent773cc925e84b248afa4ed01bf444be0935d33861
Use correct CFG orders for DF worklist processing

This adjusts the remaining three RPO computes in DF.  The DF_FORWARD
problems should use a RPO on the forward graph, the DF_BACKWARD
problems should use a RPO on the inverted graph.

Conveniently now inverted_rev_post_order_compute computes a RPO.
We still use post_order_compute and reverse its order for its
side-effect of deleting unreachable blocks.

This resuls in an overall reduction on visited blocks on cc1files by 5.2%.

Because on the reverse CFG most regions are irreducible, there's
few cases the number of visited blocks increases.  For the set
of cc1files I have this is for et-forest.i, graph.i, hwint.i,
tree-ssa-dom.i, tree-ssa-loop-ch.i and tree-ssa-threadedge.i.  For
tree-ssa-dse.i it's off-noise and I've more closely investigated
and figured it is really bad luck due to the irreducibility.

* df-core.cc (df_analyze): Compute RPO on the reverse graph
for DF_BACKWARD problems.
(loop_post_order_compute): Rename to ...
(loop_rev_post_order_compute): ... this, compute a RPO.
(loop_inverted_post_order_compute): Rename to ...
(loop_inverted_rev_post_order_compute): ... this, compute a RPO.
(df_analyze_loop): Use RPO on the forward graph for DF_FORWARD
problems, RPO on the inverted graph for DF_BACKWARD.
gcc/df-core.cc
This page took 0.055982 seconds and 5 git commands to generate.