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: 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>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Thu, 16 Oct 2014 13:40:52 +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>
> I don't like "generic annotation" facilities at all. Would it be possible
> 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