We often recompute aliases even when absolutely nothing has changed. This is quite wasteful. The attached changes compute_may_aliases into a TODO, and we now only run it when we've changed things that could destroy aliases. Well, almost. Everywhere but PRE this is true. We still run aliasing all the time after PRE, mainly because i haven't gotten the condition quite right in PRE yet, so i left it out of the patch. I also completely removed the may_alias after DSE, it wasn't clear what this was trying to do or why it was there. Sadly, the one annoying part is that there is now no easy way to put all the aliasing stuff into their own numbered dumps. For 4.4, i'd really like to redo our pass manager to support this (and maybe support a better notion of analysis, so that individual passes that currently calculate/free dominators on their own, would just say "i need dominators, i destroy dominators", and it is taken care of for them). The dump file part shouldn't be that much work, we just always compute the pass number rather than only once per function. We also then track how many times we have seen a thing named "whatever", and come up with a dump name that way. I changed the tests looking in .alias1, to look in .salias, which is where alias1 is now really going. --Dan Bootstrapped and regtested on i686-darwin. Okay for mainline? 2007-08-10 Daniel Berlin * tree-pass.h (PROP_pta): Removed. (TODO_rebuild_alias): New. (pass_may_alias): Removed. * tree-ssa-ccp.c (execute_fold_all_builtins): Only rebuild aliasing if we changed something. * tree-ssa-alias.c (compute_may_aliases): Make non-static. Update SSA internally. (pass_may_alias): Removed. (create_structure_vars): Return TODO_rebuild_alias. * tree-ssa-pre.c (do_pre): Return TODO_rebuild_alias. * tree-sra.c (tree_sra): Only rebuild aliasing if something changed. (tree_sra_early): We never affect aliasing right now. * tree-flow.h (compute_may_aliases): New prototype. * passes.c: Remove pass_may_alias from the passes. (execute_function_todo): Support TODO_rebuild_alias.