This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Clear SSA_NAME_DEF_STMT on released SSA names
- From: Jeffrey Law <law at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at redhat dot com>
- Date: Fri, 29 Sep 2006 20:44:06 -0600
- Subject: Re: [PATCH]: Clear SSA_NAME_DEF_STMT on released SSA names
- References: <4aca3dc20609291924s5856be18pda97fbe2f7ebe129@mail.gmail.com>
- Reply-to: law at redhat dot com
On Fri, 2006-09-29 at 22:24 -0400, Daniel Berlin wrote:
> Diego and I actually talked about this at some point during the
> summit, to which his answer was "oops".
> It turns out that when we release an SSA_NAME, we don't clear out
> SSA_NAME_DEF_STMT.
> This means if you walk the ssa_name array, and visit
> SSA_NAME_DEF_STMT, there is no truly reliable way to tell if the
> SSA_NAME_DEF_STMT points to a live statement or not.
>
> Since this doesn't fix a regression, I will apply this to 4.3 once 4.2
> branches, unless someone thinks it is a good idea for 4.2 (I imagine
> it could save us some memory since it may cause us to keep these
> statements live, but i haven't explored in detail whether that is true
> or not).
>
> --Dan
>
> 2006-09-29 Daniel Berlin <dberlin@dberlin.org>
>
> * tree-ssanames.c (release_ssa_name): Clear SSA_NAME_DEF_STMT
> when the SSA_NAME is released.
Bad idea unless something has changed.
SSA_NAME_DEF_STMT uses the tree chain field. WHen we release an
SSA_NAME we use the chain field to link together all the free SSA_NAME
nodes.
jeff