[tree-ssa] Avoid nondeterminism in tree-ssanames

Jan Hubicka jh@suse.cz
Mon Dec 1 16:56:00 GMT 2003


> In message <20031201163306.GW4715@kam.mff.cuni.cz>, Jan Hubicka writes:
>  >> Please stop.
>  >> 
>  >> 1. Re-using SSA_NAMES across different functions is a bad idea.  Please let
>  >'s
>  >
>  >Why?
> Because SSA_NAMEs and PHI nodes should be totally removed from the set of
> reachable GC nodes once we're done with SSA.  That ought to be an invariant
> of the implementation, even if we can't easily verify it.
> 
> If SSA_NAMEs or PHI_NODEs are reachable nodes outside the SSA pass, then that
> should be considered a bug, either in that we are not zeroing pointer fields
> when we should, not removing annotations when we should, etc etc.

Agreed, my patch is not causing SSA_NAME nodes to be reachable after SSA
is done.

Removal of SSA_NAME nodes happens (after my annotations patch) only *if*
garbage collection is invoked in between (until we figure out how to
make GGC API more flexible for this).  The whole point of the second
queue was the situation where GGC didn't happen (that is common for
small function).
It use GTY marker with deletable attribute to tell GGC to throw away
whole queue when it is run.
> 
> 
>  >> So rather than muck around making SSA_NAME (or PHI_NODE) management more
>  >> complex, let's instead address the underlying GC issues.
>  >
>  >OK, how would you propose to fix the problem with non-determinism in
>  >short term?
>  >This patch was meant as short term fix....
> Don't worry about it in the short term.  Instead spend the time dealing with
> the GC issues that need to be addressed so that tree-ssanames can go away.

Hmm, perhaps we are still not in the sync.

My short term goal is to make ggc_collect possible during SSA
compilation.  Your's tree-ssaname code with GTY deletable attribute in
is causing the bootstrap misscomparsions when this is done because we
get different SSA_NAME_VERSION depending on GGC decisions that is very
wrong.  I need this to be addressed in short term in order to proceed to
make SSA more GGC friendly.

Honza
> 
> jeff
> 



More information about the Gcc-patches mailing list