Hello, > > > > The situation is that some SSA_NAMEs are disused (removed from the > > > > code) without being released onto the free list by > > > > release_ssa_name(). > > > > > > > Yes, it happens if a name is put into the set of names to be updated by > > > update_ssa. > > > > > > After update_ssa, it should be true that every SSA name with no > > > SSA_NAME_DEF_STMT is in the free list. > > > > 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 :) > True. But remember, the stated purpose of the SSA_NAME recycling > code was _not_ to track every SSA_NAME that went "dead" and recycle > it, but instead to get the majority of them (and to ultimately save > memory by recycling them). Orphan SSA_NAME were always expected. > > If we wanted to add a new policy that all dead SSA_NAMEs must be > released to the recycling code, then that's fine, I'm not going > to object.
I think this might be a good idea. I think that this requires a lot of changes (basically going through all uses of bsi_remove and remove_phi_node and checking them), but it would be cleaner than the current situation. It should be however easy to add verification to verify_ssa, so this project should be fairly straightforward (I hope). Zdenek