This is the mail archive of the
mailing list for the GCC project.
Re: [RFC, PATCH]: Introduction of callgraph annotation class
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, 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:50:32 +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> <CAFiYyc1iyfpfK=qujDXa_xpp2kQ_j6psEOgxOWT4Y9+NhiAChQ at mail dot gmail dot com>
> On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka <firstname.lastname@example.org> 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.
Well, this is mostly indented for maintaining WHOPR summaries where we already
have infrastructure to keep them up to date just the APIs are somewhat unhandy
(having to register hooks all the time)
I also think we can put there sparse stuff that is part of IL but you
do not want to allocate it for every symbol/decl or statement
(like EH regions or not stuff in symbol table that can not be easily handled
by non-multiple inheritance)
> 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
> > hash...
> > Honza
> >> 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>).
> >> Richard.
> >> > Thank you,
> >> > Martin