------- Additional Comments From pinskia at physics dot uc dot edu 2005-09-19 16:44 ------- Subject: Re: SSA_NAMEs are not released after no longer being used.
On Sep 19, 2005, at 12:33 PM, amacleod at redhat dot com wrote: > "And that will not work for the SSA_NAMEs used for aliasing and then > the > variable becomes a gimple register." > > If we set SSA_NAME_DEF_FOR_STMT during inserts, and clear it during > bsi_remove, > does that resolve the issues you are referring to? We don't call bsi_remove for those statements so SSA_NAME_DEF_FOR_STMT is always set to that statement even though the SSA_NAME is unused. The testcase (-O1 -fno-tree-fre) from my orginal email on the subject: int f(void) { int i; int *j = &i; i = 1; return *j; } SSA form right before .alias2: # i_4 = V_MUST_DEF <i_3>; i = tt_2; D.1274_5 = tt_2; return tt_2; After: i_1 = tt_2; D.1274_5 = tt_2; return tt_2; Note that i_4 is not freed and its SSA_NAME_DEF_FOR_STMT is NULLd. Thanks, Andrew Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23940