This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Symbol table 13/many: reachability code rewrite
On 04/25/12 11:46, Jan Hubicka wrote:
>>> On Wed, Apr 25, 2012 at 5:04 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> + /* Return true when there are references to NODE. */
>>>> +
>>>> + static bool
>>>> + referred_to_p (symtab_node node)
>>>> + {
>>>> + int i;
>>>> + struct ipa_ref *ref;
>>>> +
>>>> + for (i = 0; ipa_ref_list_referring_iterate (&node->symbol.ref_list, i, ref);
>>>> + i++)
>>>> + return true;
>>>
>>> This looks odd. Don't you want to do something with ref?
>> No, I have just iteration API, not API to check how many refs are there
>> and I want to see if there are any...
> Actually it is bit too much of cut&paste. Just
> if (ipa_ref_list_referring_iterate (&node->symbol.ref_list, 0, ref))
> would work too. i will update it ;)
And with a comment too, please.
r~