]> git.ipfire.org Git - thirdparty/gcc.git/commit
change DF to use the proper CFG order for DF_FORWARD problems
authorRichard Biener <rguenther@suse.de>
Fri, 21 Apr 2023 09:40:23 +0000 (11:40 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 21 Apr 2023 11:25:39 +0000 (13:25 +0200)
commit94a04c24c33580179e51d3218f2edd2cf88cadcd
tree38874ebf9677bd2c476124969375a439f4093e65
parentd06e9264b0192c2c77e07d7fb0fe090efcb510c0
change DF to use the proper CFG order for DF_FORWARD problems

This changes DF to use RPO on the forward graph for DF_FORWARD
problems.  While that naturally maps to pre_and_rev_postorder_compute
we use the existing (wrong) CFG order for DF_BACKWARD problems
computed by post_order_compute since that provides the required
side-effect of deleting unreachable blocks.

The change requires turning the inconsistent vec<int> vs int * back
to consistent int *.  A followup patch will change the
inverted_post_order_compute API and change the DF_BACKWARD problem
to use the correct RPO on the backward graph together with statistics
I produced last year for the combined effect.

* df.h (df_d::postorder_inverted): Change back to int *,
clarify comments.
* df-core.cc (rest_of_handle_df_finish): Adjust.
(df_analyze_1): Likewise.
(df_analyze): For DF_FORWARD problems use RPO on the forward
graph.  Adjust.
(loop_inverted_post_order_compute): Adjust API.
(df_analyze_loop): Adjust.
(df_get_n_blocks): Likewise.
(df_get_postorder): Likewise.
gcc/df-core.cc
gcc/df.h