> 
> 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 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

Reply via email to