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: RFA: Disentangle builtin folding from expanding


Hi,

On Mon, 28 Sep 2009, Richard Guenther wrote:

> > + Â Â Â Â Â Â Â Â Â Â Â Â Â Â || is_gimple_call (new_stmt))
> > + Â Â Â Â Â Â Â Â Â Â Â Â Â cgraph_update_edges_for_call_stmt (old_stmt, old_decl, new_stmt);
> > +
> > + Â Â Â Â Â Â Â Â Â Â Â Â if (maybe_clean_or_replace_eh_stmt (old_stmt, new_stmt))
> > + Â Â Â Â Â Â Â Â Â Â Â Â Â gimple_purge_dead_eh_edges (BASIC_BLOCK (first));
> 
> If that ever happens to replace EH on not the last stmt inserted then
> we would need to split the block here.  Thus, this only needs to be done
> on gsi_stmt (gsi).

Oh right.  Changed with a largish comment.

> > + Â Â Â Â Â Â else if (fold_stmt (&gsi))
> > Â Â Â Â Â Â Â Â{
> > Â Â Â Â Â Â Â Â Â/* Re-read the statement from GSI as fold_stmt() may
> > Â Â Â Â Â Â Â Â Â Â have changed it. Â*/
> 
> A much nicer interface to fold_stmt would be
> 
> bool fold_stmt (gimple stmt, gimple_seq *seq)
> 
> where if *SEQ is not NULL after the call *SEQ replaces the old stmt,
> otherwise it is updated in-place.

Yeah, something like that.  Or a grand fold_and_update_stmt, so that 
callers (the few that are there) don't need to iterate themself.

> But that's for the long awaited cleanup of fold_stmt*

Indeed ;)

> Ok with these changes.

Thanks, committed with the requested changes as r152236.


Ciao,
Michael.

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