This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Lazy updating of stmt operands


In message <1071611437.13020.198.camel@p4>, Andrew MacLeod writes:
 >On Mon, 2003-12-15 at 14:18, Zdenek Dvorak wrote:
 >> Hello,
 >> 
 >> 
 >> > defining stmt's annotation, so given any SSA variable, you can get to
 >> > the immediate uses by looking at the annotation for SSA_NAME_DEF_STMT.
 >> > It needs a marginal extention to deal with the fact that there can be
 >> > multiple defs/vdefs on one stmt, but we need to do that to handle
 >> > virtual defs anyway.  I would prefer to keep this information right with
 >> > the stmt rather than in a table on the side.
 >> 
 >> Immediate use is not a property of the statement, but the property of
 >> the ssa name; so it should be in the SSA_NAME, as my patch does,
 >> not in the statement annotations.
 >
 >After pondering it, I have concluded you are correct, the immediate uses
 >info should be attached to the SSA_NAME.  The pragmatic reason is that
 >it eliminates the need to have the def stmt of the SSA_NAME in place
 >before the uses are seen... 
I'll note that this would actually make the whole SSA_NAME recycling
vs dangling references problem in the IL a lot easier to detect and
maybe solve.

When the time comes to release an SSA_NAME, fundamentally we know that
all its references ought to be dead as well and we should remove them
from the IL.  If we had immediate uses that would be relatively easy
to do.

Instead right now we rely upon folks to release SSA_NAMEs and not to
leave any dangling references in the IL.  We've already run into a 
couple places where this has been problematical.

[ Jan's got checking code for this, which I'm hoping to take a close look
  at tonight. ]


Jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]