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: New varpool walking API


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


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