This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Simplifying Gimple Generation
Hi,
On Thu, 15 Nov 2012, Gabriel Dos Reis wrote:
> On Thu, Nov 15, 2012 at 8:48 AM, Michael Matz <matz@suse.de> wrote:
> [...]
> > The method name should imply the action, e.g. 'add_stmt' or append_stmt
> > or the like.
>
> strongly agreed.
> [...]
>
> > All in all I think we can severely improve on building gimple statements
> > without introduction of any helper class. Basically, whenever a helper
> > class merely contains one member of a different type, then I think that
> > other type should be improved so that the wrapper class isn't necessary
> > anymore. Fewer types -> good :)
>
> no, it is the opposite. Distinct abstractions should be materialized
But the proposed improvements aren't distinct abstractions at all, they
are interface cleanups and idiom shortenings. That's my point, those
improvements should be made to the interface of the gimple type, so that
working with that one becomes nicer, instead of adding an
abstractiong with which working is easier than with gimple directly.
It's not that our gimple interface is cast in stone so that we have to
wrap it to improve it. We can _directly_ improve it.
> by distinct types. => less opportunities for bugs.
Ciao,
Michael.