This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka <hubicka@ucw.cz> 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 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]