Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-31 Thread Martin Liška
On 10/16/2014 04:15 PM, Martin Jambor wrote: Hi, On Wed, Oct 15, 2014 at 06:26:34PM +0200, Martin Liska wrote: Hello. Following patch introduces a new class called callgraph_annotation. Idea behind the patch is to provide a generic interface one can use to register custom info related to a c

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Jambor
Hi, On Thu, Oct 16, 2014 at 01:44:05PM +0200, Richard Biener wrote: > On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka wrote: > >> > >> I don't like "generic annotation" facilities at all. Would it be possible > > > > Why? > > Because it's the way to hell if the IL has "magic" things only one > pas

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Jambor
Hi, On Wed, Oct 15, 2014 at 06:26:34PM +0200, Martin Liska wrote: > Hello. > > Following patch introduces a new class called callgraph_annotation. Idea > behind the patch is to provide a generic interface one can use to register > custom info related to a cgraph_node. As you know, symbol_table

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 02:05 PM, Martin Liška wrote: On 10/16/2014 02:01 PM, Jan Hubicka wrote: Hello. If I recall correctly, we recycle cgraph_nodes and it's possible that an UID is given to different nodes: symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from perspective that it c

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 02:01 PM, Jan Hubicka wrote: Hello. If I recall correctly, we recycle cgraph_nodes and it's possible that an UID is given to different nodes: symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from perspective that it cannot be used as a index to a vector. It was

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Jan Hubicka
> > Hello. > > > > If I recall correctly, we recycle cgraph_nodes and it's possible that an UID > > is given to different nodes: > > symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from > > perspective that it cannot be used as a index to a vector. > > > > It was also Honza's n

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Jan Hubicka
> On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka wrote: > >> > >> I don't like "generic annotation" facilities at all. Would it be possible > > > > Why? > > Because it's the way to hell if the IL has "magic" things only one > pass can understand. It can't ever know if it may invalidate some > of

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 1:42 PM, Martin Liška wrote: > On 10/16/2014 01:31 PM, Richard Biener wrote: >> >> On Wed, Oct 15, 2014 at 6:26 PM, Martin Liška wrote: >>> >>> Hello. >>> >>> Following patch introduces a new class called callgraph_annotation. Idea >>> behind the patch is to provide a gene

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka wrote: >> >> I don't like "generic annotation" facilities at all. Would it be possible > > Why? Because it's the way to hell if the IL has "magic" things only one pass can understand. It can't ever know if it may invalidate some of that data. Same r

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 01:31 PM, Richard Biener wrote: On Wed, Oct 15, 2014 at 6:26 PM, Martin Liška wrote: Hello. Following patch introduces a new class called callgraph_annotation. Idea behind the patch is to provide a generic interface one can use to register custom info related to a cgraph_node. As

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Jan Hubicka
> > I don't like "generic annotation" facilities at all. Would it be possible Why? > to make cgraph UIDs not sparse? (keep a free-list of cgraph nodes cgraph nodes are already kept "dense" via freelist. However in WPA you usually have a lot of different nodes prior merging and unreachable c

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Richard Biener
On Wed, Oct 15, 2014 at 6:26 PM, Martin Liška wrote: > Hello. > > Following patch introduces a new class called callgraph_annotation. Idea > behind the patch is to provide a generic interface one can use to register > custom info related to a cgraph_node. As you know, symbol_table provides > hooks

[RFC, PATCH]: Introduction of callgraph annotation class

2014-10-15 Thread Martin Liška
Hello. Following patch introduces a new class called callgraph_annotation. Idea behind the patch is to provide a generic interface one can use to register custom info related to a cgraph_node. As you know, symbol_table provides hooks for creation, deletion and duplication of a cgraph_node. If