This is the mail archive of the gcc-patches@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: PATCH Re: [ast-optimizer-branch]: Simplify STMT_EXPR's


On Wed, 19 Jun 2002, Diego Novillo wrote:

> On Thu, 20 Jun 2002, Jason Merrill wrote:
> 
> > --- 193,207 ----
> >         tree next, pre, post;
> >         int keep_stmt_p;
> >         tree stmt = *stmt_p;
> > +       int saved_stmts_are_full_exprs_p;
> > + 
> > +       /* Set up context appropriately for handling this statement.  */
> > +       saved_stmts_are_full_exprs_p = stmts_are_full_exprs_p ();
> > +       prep_stmt (stmt);
> >   
> What's the purpose of saved_stmts_are_full_exprs_p?  I don't see
> it used anywhere else.

Look at c-semantics.c, expand_expr, and the gen* functions.

Or, to cut to the chase, expand_start_target_temps in stmt.c (which is 
called if (stmts_are_full_exprs) from the gen* functions in c-semantics.c:

/* Specify the scope of temporaries created by TARGET_EXPRs.  Similar
   to CLEANUP_POINT_EXPR, but handles cases when a series of calls to
   expand_expr are made.  After we end the region, we know that all
   space for all temporaries that were created by TARGET_EXPRs will be
   destroyed and their space freed for reuse.  */
> 
> Thanks.  Diego.
> 
> 


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