New varpool walking API
Andrew Pinski
pinskia@physics.uc.edu
Tue Dec 19 19:30:00 GMT 2006
>
> Jan,
>
> Just a couple of comments
>
> > Index: ipa-reference.c
> > ===================================================================
> > *** ipa-reference.c (revision 120017)
> > --- ipa-reference.c (working copy)
> > *************** static void
> > *** 774,786 ****
> > analyze_variable (struct varpool_node *vnode)
> > {
> > tree global = vnode->decl;
> > ! if (TREE_CODE (global) == VAR_DECL)
> > ! {
> > ! if (DECL_INITIAL (global))
> > ! walk_tree (&DECL_INITIAL (global), scan_for_static_refs,
> > ! NULL, visited_nodes);
> > ! }
> > ! else gcc_unreachable ();
> > }
> >
> > /* This is the main routine for finding the reference patterns for
> > --- 774,781 ----
> > analyze_variable (struct varpool_node *vnode)
> > {
> > tree global = vnode->decl;
> > ! walk_tree (&DECL_INITIAL (global), scan_for_static_refs,
> > ! NULL, visited_nodes);
> > }
> >
> > /* This is the main routine for finding the reference patterns for
> > *************** static_execute (void)
> > *** 903,909 ****
> > ipa_init ();
> >
> > /* Process all of the variables first. */
> > ! for (vnode = varpool_nodes_queue; vnode; vnode = vnode->next_needed)
> > analyze_variable (vnode);
> >
> > /* Process all of the functions next.
> > --- 898,904 ----
> > ipa_init ();
> >
> > /* Process all of the variables first. */
> > ! FOR_EACH_STATIC_INITIALIZER (vnode)
> Uhm this looks wrong, shouldn't this for FOR_EACH_STATIC_VARIABLE?
> > analyze_variable (vnode);
No, because analyze_variable used to check for a static initialized variable while now
it does not.
Thanks,
Andrew Pinski
More information about the Gcc-patches
mailing list