This is the mail archive of the
mailing list for the GCC project.
Re: [RFC, PATCH]: Introduction of callgraph annotation class
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Martin LiÅka <mliska at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Martin Jambor <mjambor at suse dot cz>
- Date: Thu, 16 Oct 2014 13:44:05 +0200
- Subject: Re: [RFC, PATCH]: Introduction of callgraph annotation class
- Authentication-results: sourceware.org; auth=none
- References: <543EA03A dot 7000000 at suse dot cz> <CAFiYyc12P-DMR=7otSYN+G6DJLK=y+EN7c4sBFZBk1=Lgz9Mzw at mail dot gmail dot com> <20141016114052 dot GA11618 at kam dot mff dot cuni dot cz>
On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka <email@example.com> wrote:
>> I don't like "generic annotation" facilities at all. Would it be possible
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 reason why I dislike the ->aux pointers we have. (even if they
are of course convenient)
>> 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 code removal and very few afterwards,
> the number of nodes grows again with inlining.
> Depending on what you want to store for values, I guess either vector or hashtable is
> good choice - if you want to keep data that needs to be duplicated per inline clone
> you can rely on density. If you want data on few function bodies, you will likely use
>> with UID < cgraph_max_uid, only really free nodes at the end)
>> Using a different data structure than a vector indexed by cgraph UID
>> should also be easily possible (a map from UID to data, hash_map <int, T>).
>> > Thank you,
>> > Martin