This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SSA_NAMEs not always released
> Ive never been a big fan of having to call something to release
> ssa_names, its too bug prone. I would much prefer to see something like
> a cleanup pass done every once in a while... an ssa-name garbage
> collector if you will :-). It seems to me that between major
> optimization passes, any SSA_NAME with no defining stmt, no uses, and
> isn't a default def of some sort can simply be released. Or at least
> some similar set of criteria. I suspect immediate uses were not
> available when release_defs was invented, so this was not easily done.
Absolutely correct, we didn't have good access to the immediate
uses when I added the SSA_NAME recycling.
It's also the case that the SSA graph updating after threading jumps
is a lot more selective and should generate significantly less churn
of SSA_NAME nodes than it used to do.
So it may make sense to simply schedule collecting of unused SSA_NAMEs
via the pass manager, possibly integrated with Pinski's trivial dead
code elimination.
jeff