Re: Traversing trees in a plugin...

2012-06-03 Thread Ian Lance Taylor
Brett Foster writes: > 1) How to marking a node as visited by my algorithm (without screwing > up the compiler!) Use a pointer_set. > 2) How to associate additional data (perhaps a pointer to something > else) to a node (like a unique identifier, or a pointer to a data > structure). Use a poin

Re: Traversing trees in a plugin...

2012-06-02 Thread Basile Starynkevitch
On Sat, 2 Jun 2012 11:47:51 -0700 Brett Foster wrote: > On Sat, Jun 2, 2012 at 11:31 AM, Basile Starynkevitch > wrote: > > In the MELT meta-plugin (recall that MELT is a high-level domain specific > > language to > > extend GCC, see http://gcc-melt.org/ for more) we extensively use > > associa

Re: Traversing trees in a plugin...

2012-06-02 Thread Brett Foster
On Sat, Jun 2, 2012 at 11:31 AM, Basile Starynkevitch wrote: > In the MELT meta-plugin (recall that MELT is a high-level domain specific > language to > extend GCC, see http://gcc-melt.org/ for more) we extensively use associative > hash-tables > for that. MELT offers homogeneous hash-tables, e.

Re: Traversing trees in a plugin...

2012-06-02 Thread Basile Starynkevitch
On Sat, 2 Jun 2012 20:31:26 +0200 Basile Starynkevitch wrote: > In a few words, plugins cannot extend existing GCC data structures, but can > associate them > to their own data. I forgot to mention that gimple-s (but not tree-s) give you a unsigned client number called a uid, which a single pas

Re: Traversing trees in a plugin...

2012-06-02 Thread Basile Starynkevitch
On Sat, 2 Jun 2012 10:48:47 -0700 Brett Foster wrote: > Hi all, > > I'm working on a GCC plugin, having made a lot of progress on that > front. So far running my plugin works 'more or less' on things like > the linux kernel. On the other hand running it on the plugin itself > causes problems. Gi

Traversing trees in a plugin...

2012-06-02 Thread Brett Foster
Hi all, I'm working on a GCC plugin, having made a lot of progress on that front. So far running my plugin works 'more or less' on things like the linux kernel. On the other hand running it on the plugin itself causes problems. Given that some of the data structures are pretty complicated in GCC I