On 10/16/14 11:52, Richard Biener wrote:
I'd walk the SSA_NAMEs at the end checking for zero uses. I'm
curious how often that will trigger :-)
Most often for the initial into SSA I guess. After that only for the
cases we rename a variable which does not happen often. SRA and
update-address-taken cone to my mind.
That'd be my guess too. Jump threading probably creates them as well
since we don't try to find any of the code that becomes dead in the
duplicates after we remove the conditional. Which means after DOM and VRP.
I don't suppose we have a map of newly created names handy anywhere :-)
BTW, I dislike having multiple DCE implementations...
Similarly. The proposal above was just to determine if we should
schedule DCE or not.
jeff