[PATCH][RFC] Add gimple_fold

Diego Novillo dnovillo@google.com
Thu Mar 24 13:05:00 GMT 2011


On Tue, Mar 22, 2011 at 04:59, Richard Guenther <rguenther@suse.de> wrote:

> I simply put it in place as a possibility, I currently don't plan
> to implement any GF_KIND_COMPLEX folders (the caller would need to
> re-gimplify them which doesn't sound too useful).  Maybe I should
> simply drop it.

Perhaps.  Not supporting an "everything else" bucket would help us not
fall into the usual trap of having to support too many weird cases.
Though I'm sure we can find other ways of falling into that ;)


>> For instance, if folding ends up producing a complex tree, would it need to be
>> gimplified?  Maybe we could generate the gimplified statement and return the
>> SSA name on the LHS?  Though I'm not sure I like even this.
>
> Hm, I tried to avoid making the folder rewrite existing or emit new
> stmts - the idea was to make the interface cheap, not allocating GC
> memory for expressions or statements.

Sounds reasonable.  Perhaps this could be done by a wrapper, if needed.


Diego.



More information about the Gcc-patches mailing list