df: Don't abuse bb->aux (PR94148, PR94042)
authorSegher Boessenkool <segher@kernel.crashing.org>
Thu, 12 Mar 2020 07:12:50 +0000 (07:12 +0000)
committerSegher Boessenkool <segher@kernel.crashing.org>
Fri, 13 Mar 2020 15:15:26 +0000 (15:15 +0000)
commit5c7e6d4bdf879b437b43037e10453275acabf521
tree80d97047d47fe59121a20a2e7cc849cbbf06e05f
parent80a13af724aedfb360893dcc16aa7cc12ca49799
df: Don't abuse bb->aux (PR94148, PR94042)

The df dataflow solvers use the aux field in the basic_block struct,
although that is reserved for any use by passes.  And not only that,
it is required that you set all such fields to NULL before calling
the solvers, or you quietly get wrong results.

This changes the solvers to use a local array for last_change_age
instead, just like it already had a local array for last_visit_age.

PR rtl-optimization/94148
PR rtl-optimization/94042
* df-core.c (BB_LAST_CHANGE_AGE): Delete.
(df_worklist_propagate_forward): New parameter last_change_age, use
that instead of bb->aux.
(df_worklist_propagate_backward): Ditto.
(df_worklist_dataflow_doublequeue): Use a local array last_change_age.
gcc/ChangeLog
gcc/df-core.c