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


On Mon, Sep 28, 2009 at 5:59 AM, Michael Matz <matz@suse.de> wrote:
> 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.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44592


-- 
H.J.


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