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: [PATCH] Allow passmanager to switch between IPA and local passes


> On Sun, Jun 05, 2005 at 12:21:08PM +0200, Jan Hubicka wrote:
> > ! 	  if (cfun)
> > ! 	    execute_pass_list (pass->sub);
> > ! 	  else
> > ! 	    {
> > ! 	      struct cgraph_node *node;
> > ! 	      tree_register_cfg_hooks ();
> > ! 	      for (node = cgraph_nodes; node; node = node->next)
> > ! 		if (node->analyzed)
> > ! 		  {
> > ! 		    push_cfun (DECL_STRUCT_FUNCTION (node->decl));
> > ! 		    current_function_decl = node->decl;
> > ! 		    execute_pass_list (pass->sub);
> > ! 		    free_dominance_info (CDI_DOMINATORS);
> > ! 		    free_dominance_info (CDI_POST_DOMINATORS);
> > ! 		    current_function_decl = NULL;
> > ! 		    pop_cfun ();
> > ! 		    ggc_collect ();
> 
> I think this just uglifies this function.  I think you should simply
> change...
> 
> >     execute_pass_list (all_ipa_passes);
> 
> ... this to be a different function.

OK, breaking it out into execute_local_passes is definitly not bad idea.
I was however wondering whether we don't want to make some other way to
differentiate IPA/local passes as currently we can't have IPA subpasses
of IPA pass.  But if this looks acceptable for now, I will just create
updated patch.

Thanks,
Honza
> 
> 
> r~


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