]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/117932 - speed up DF solver
authorRichard Biener <rguenther@suse.de>
Fri, 6 Dec 2024 15:36:39 +0000 (16:36 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 9 Dec 2024 09:53:40 +0000 (10:53 +0100)
commit57dcb27e7a48151ad5f9a6122c6a40fac31843e9
tree50874ef3711b6e539611256ae90c192f8bae9eba
parentd4e1f7cfdb8375c2a0076d4227a220b5e2682834
middle-end/117932 - speed up DF solver

The following addresses slow bitmap operations for maintaining the
iteration order of df_worklist_dataflow_doublequeue for large number
of basic-blocks.  The main complexity change is switching the
worklist and pending bitmaps to tree view, a secondary change is
avoiding the fully populated initial bitmap for the first iteration
and instead special-casing that plus avoiding all forward worklist
bitmap sets in that iteration.  Usually second or later iterations
are sparse, so optimizing the first iteration seems worthwhile.

For PR117932 when isolating from ext-dce and fold-mem-offset issues
this results in a 10% compile-time reduction.

PR middle-end/117932
* df-core.cc (df_worklist_propagate_forward): When WORKLIST
is NULL, do not set bits there.
(df_worklist_propagate_backward): Likewise.
(df_worklist_dataflow_doublequeue): Separate first pass
over all blocks with NULL worklist.
(df_worklist_dataflow): Do not initialize pending and adjust.
gcc/df-core.cc