Re: [RFC] Meta-description for tree and gimple folding

2014-04-25 Thread Richard Biener
On Thu, 24 Apr 2014, Jeff Law wrote: On 02/28/14 08:21, Kai Tietz wrote: Hmm, this all reminds me about the approach Andrew Pinski and I came up with two years ago. All in all I think it might be worth to express folding-patterns in a more abstract way. So the md-like Lisp syntax for

Re: [RFC] Meta-description for tree and gimple folding

2014-04-24 Thread Jeff Law
On 02/28/14 08:21, Kai Tietz wrote: Hmm, this all reminds me about the approach Andrew Pinski and I came up with two years ago. All in all I think it might be worth to express folding-patterns in a more abstract way. So the md-like Lisp syntax for this seems to be just stringent. We make use

Re: [RFC] Meta-description for tree and gimple folding

2014-04-24 Thread Jeff Law
On 03/03/14 07:05, Kai Tietz wrote: [the possibility to use offline verification tools for the transforms comes to my mind as well] This is actually a pretty interesting idea. As it would allow us to do testing for this area without side-effects by high-level passes, target-properties, etc

Re: [RFC] Meta-description for tree and gimple folding

2014-03-12 Thread Richard Biener
On Tue, 11 Mar 2014, Marc Glisse wrote: On Mon, 3 Mar 2014, Richard Biener wrote: How do you handle a transformation that currently tries to recursively fold something else and does the main transformation only if that simplified? And doesn't do the other folding (because it's

Re: [RFC] Meta-description for tree and gimple folding

2014-03-12 Thread Marc Glisse
On Wed, 12 Mar 2014, Richard Biener wrote: On Tue, 11 Mar 2014, Marc Glisse wrote: On Mon, 3 Mar 2014, Richard Biener wrote: How do you handle a transformation that currently tries to recursively fold something else and does the main transformation only if that simplified? And doesn't do

Re: [RFC] Meta-description for tree and gimple folding

2014-03-12 Thread Richard Biener
On Wed, 12 Mar 2014, Marc Glisse wrote: On Wed, 12 Mar 2014, Richard Biener wrote: On Tue, 11 Mar 2014, Marc Glisse wrote: On Mon, 3 Mar 2014, Richard Biener wrote: How do you handle a transformation that currently tries to recursively fold something else and

Re: [RFC] Meta-description for tree and gimple folding

2014-03-11 Thread Marc Glisse
On Mon, 3 Mar 2014, Richard Biener wrote: How do you handle a transformation that currently tries to recursively fold something else and does the main transformation only if that simplified? And doesn't do the other folding (because it's not in the IL literally?)? Similar to the cst without

Re: [RFC] Meta-description for tree and gimple folding

2014-03-07 Thread Kai Tietz
2014-03-04 14:14 GMT+01:00 Richard Biener rguent...@suse.de: On Mon, 3 Mar 2014, Kai Tietz wrote: 2014-03-03 12:33 GMT+01:00 Richard Biener rguent...@suse.de: On Fri, 28 Feb 2014, Kai Tietz wrote: Hmm, this all reminds me about the approach Andrew Pinski and I came up with two years

Re: [RFC] Meta-description for tree and gimple folding

2014-03-07 Thread Richard Biener
On Fri, 7 Mar 2014, Kai Tietz wrote: 2014-03-04 14:14 GMT+01:00 Richard Biener rguent...@suse.de: On Mon, 3 Mar 2014, Kai Tietz wrote: 2014-03-03 12:33 GMT+01:00 Richard Biener rguent...@suse.de: On Fri, 28 Feb 2014, Kai Tietz wrote: Hmm, this all reminds me about the approach

Re: [RFC] Meta-description for tree and gimple folding

2014-03-05 Thread Richard Biener
On Tue, 4 Mar 2014, Marc Glisse wrote: On Mon, 3 Mar 2014, Richard Biener wrote: How do I restrict some subexpression to have a single use? This kind of restrictions come via the valueize() hook - simply valueize to NULL_TREE to make the match fail (for example

Re: [RFC] Meta-description for tree and gimple folding

2014-03-04 Thread Richard Biener
On Mon, 3 Mar 2014, Kai Tietz wrote: 2014-03-03 12:33 GMT+01:00 Richard Biener rguent...@suse.de: On Fri, 28 Feb 2014, Kai Tietz wrote: Hmm, this all reminds me about the approach Andrew Pinski and I came up with two years ago. You are talking about the gimple folding interface?

Re: [RFC] Meta-description for tree and gimple folding

2014-03-04 Thread Marc Glisse
On Mon, 3 Mar 2014, Richard Biener wrote: How do I restrict some subexpression to have a single use? This kind of restrictions come via the valueize() hook - simply valueize to NULL_TREE to make the match fail (for example SSA_NAME_OCCURS_IN_ABNORMAL_PHI could be made fail that way).

Re: [RFC] Meta-description for tree and gimple folding

2014-03-03 Thread Georg-Johann Lay
Am 02/27/2014 03:34 PM, schrieb Richard Biener: I've been hacking on a prototype that generates matching and simplification code from a meta-description. The goal is to provide a single source of transforms currently spread over the compiler, mostly fold-const.c, gimple-fold.c and

Re: [RFC] Meta-description for tree and gimple folding

2014-03-03 Thread Richard Biener
On Fri, 28 Feb 2014, Marc Glisse wrote: On Thu, 27 Feb 2014, Richard Biener wrote: I've been hacking on a prototype that generates matching and simplification code from a meta-description. The goal is to provide a single source of transforms currently spread over the compiler, mostly

Re: [RFC] Meta-description for tree and gimple folding

2014-03-03 Thread Richard Biener
On Fri, 28 Feb 2014, Diego Novillo wrote: On Thu, Feb 27, 2014 at 9:34 AM, Richard Biener rguent...@suse.de wrote: Comments or suggestions? On the surface it looks like a nice idea. However, I would like to understand the scope of this. Are you thinking of a pattern matcher with

Re: [RFC] Meta-description for tree and gimple folding

2014-03-03 Thread Richard Biener
On Fri, 28 Feb 2014, Kai Tietz wrote: Hmm, this all reminds me about the approach Andrew Pinski and I came up with two years ago. You are talking about the gimple folding interface? Yes, but it's more similar to what I proposed before that. All in all I think it might be worth to

Re: [RFC] Meta-description for tree and gimple folding

2014-03-03 Thread Kai Tietz
2014-03-03 12:33 GMT+01:00 Richard Biener rguent...@suse.de: On Fri, 28 Feb 2014, Kai Tietz wrote: Hmm, this all reminds me about the approach Andrew Pinski and I came up with two years ago. You are talking about the gimple folding interface? Yes, but it's more similar to what I proposed

Re: [RFC] Meta-description for tree and gimple folding

2014-02-28 Thread Basile Starynkevitch
On Thu, 2014-02-27 at 15:34 +0100, Richard Biener wrote: I've been hacking on a prototype that generates matching and simplification code from a meta-description. For what it is worth, MELT has a similar feature. http://gcc-melt.org/ regards -- Basile STARYNKEVITCH

Re: [RFC] Meta-description for tree and gimple folding

2014-02-28 Thread Marc Glisse
On Thu, 27 Feb 2014, Richard Biener wrote: I've been hacking on a prototype that generates matching and simplification code from a meta-description. The goal is to provide a single source of transforms currently spread over the compiler, mostly fold-const.c, gimple-fold.c and

Re: [RFC] Meta-description for tree and gimple folding

2014-02-28 Thread Diego Novillo
On Thu, Feb 27, 2014 at 9:34 AM, Richard Biener rguent...@suse.de wrote: Comments or suggestions? On the surface it looks like a nice idea. However, I would like to understand the scope of this. Are you thinking of a pattern matcher with peephole like actions? Or would you like to evolve a

Re: [RFC] Meta-description for tree and gimple folding

2014-02-28 Thread Kai Tietz
Hmm, this all reminds me about the approach Andrew Pinski and I came up with two years ago. All in all I think it might be worth to express folding-patterns in a more abstract way. So the md-like Lisp syntax for this seems to be just stringent. We make use of such a script-language already for

[RFC] Meta-description for tree and gimple folding

2014-02-27 Thread Richard Biener
I've been hacking on a prototype that generates matching and simplification code from a meta-description. The goal is to provide a single source of transforms currently spread over the compiler, mostly fold-const.c, gimple-fold.c and tree-ssa-forwprop.c. Another goal is to make these