This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SSA_NAMES: should there be an unused, un-free limbo?
> In this case this isn't true, because we have code that orphans ssa
> names without releasing them.
> I'm sure Robert will explain further details in a few moments :)
Actually you explained all the relevant details. The question is
whether it should be allowed or not. So far almost everyone seems to
think not.
> It will cause not code correctness issues, but make life very very
> annoying. If you walk the ssa names one by one, and you have some
> pointing to statements that don't exist anymore, because the names
> were not released and defining statements nulled out by
> release_ssa_name, you are going to run into segfaults trying to walk
> them.
It isn't specifically important that the defining statements be nulled
out, of course. What matters is that there should be *some way* to
tell whether the item is in current use. Incidentally, checking for a
NULL defining statement currently doesn't work anyway because the same
field as SSA_NAME_DEF_STMT is reused for the free list
chaining. There's a flag to tell me whether a node is in the free
list, but of course that flag isn't set for the limbo nodes that you
and I agree are a problem -- because they aren't in the free list (and
they aren't in the program either).
-- Robert