This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO][PATCH] splitting lto annotations and functions for LGEN
I'm sorry if I mis-read your e-mail. Are you suggesting that using
both a hash table that maps nodes to indices for fast look up and a
vector for traversal? Okay, I will change that.
-Doug
2008/8/27 Doug Kwan (Ãö®¶¼w) <dougkwan@google.com>:
>> How about making this a VEC to simplify handling? This is used for
>> sequential traversals and the hash table for quick lookups, right? Each
>> cgraph_node_set_element would only need to have its associated index into
>> this VEC.
>
> That is doable but containment tests will be O(n). Currently there is
> only one use of cgraph_node_in_set_p, which is in the boundary
> computation of ipa-cgraph.c. I can change the implemention of
> cgraph_node_set to be vector based and adjust the code in ipa-cgraph.c
> to use to bit vector for containment test.
>