This is the mail archive of the gcc@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: RFC: GIMPLE tuples. Design and implementation proposal


Mike Stump <mrs@apple.com> writes:

> On Apr 10, 2007, at 10:53 AM, Ian Lance Taylor wrote:
> > I seem to recall that at one point somebody worked on a gensimplify
> > program or something like that.  Would it make sense to revive that
> > approach, and use it to generate simplifiers for trees, GIMPLE, and
> > RTL, to avoid triplification of these basic optimizations?
> 
> Hum...  Almost sounds like a job for a template... [ takes step
> backwards ]

I think making this work as a template would be kind of tough,
actually, if you think about the details (e.g., PLUS_EXPR vs. PLUS
vs. GS_PLUS_EXPR).  Doable but rather awkward.  I guess you could use
dozens of template parameters, most of them integers providing the
code values.

Virtual functions and a table of operator codes would probably work
just as well, and be slightly more comprehensible.

Ian


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