This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use pass manager for RTL passes 3/4: move pass manager to passes.c
> The reason was to track which passes use trees and which use RTL and
which have the CFG.
Yes, and the person writing the pass should know this, and set
PROP_rtl or PROP_trees appropriately.
It's not that the person writing the pass that should know this. It is
the pass manager that needs this in order to execute TODO_dump_func
correctly; and register_dump_files needs it in order to reset the
counter when we reach RTL passes.
It is easier to fix this if these four patches go in though, because
then every dump file is managed in exactly the same way. Then one can:
1) move pass_expand to inside pass_rest_of_compilation
2a) remove pass_rest_of_compilation from all_passes, maybe renaming it
to all_rtl_passes
2b) call register_dump_files separately for all_rtl_passes
2c) execute all_rtl_passes from tree_rest_of_compilation
3a) remove the code dealing with properties from register_dump_files
3b) instead, register_dump_files could accept and return a dump file number
3c) ... so that you reset the dump file number in r_d_f's caller
I've got plans to make us recompute things like alias info and
dominators when we've seen that properties got destroyed, and only then.
There's TODO_* for that. It would surely be possible to add PROP_ssa to
properties_destroyed, and remove TODO_update_ssa. But adding TODO flags
automatically based on properties_destroyed or properties_required is
not something I would like; I am afraid of hidden performance pitfalls
if the compiler ends up recalculating too often the data structures you
mentioned.
I actually like having the full set of before/after properties
available, and as I said I only consider properties_required a
misnomer. But if this bothers you, it's ok for me to take
responsibility of the steps above.
Paolo