[tree-profiling/RFC] Extending passmanager to deal with IPA passes

Jan Hubicka jh@suse.cz
Sat Nov 13 13:38:00 GMT 2004


> 
> On Oct 25, 2004, at 5:13 AM, Jan Hubicka wrote:
> 
> >Hi,
> >this patch extends the passmanager to deal with IPA passes.  This is
> >done by adding 4 new hooks neccesary to the PM structure and adding 
> >some
> >extra entry points to do the IPA analysis and optimizations to the
> >tree-optimize.
> >In general I would like to replace the tree_rest_of_compilation by just
> >set of nested passes so the passmanager is completely driven by
> >cgraphunit and all the other actions are driven by the PM.
> 
> Yes I would love to see that tree_rest_of_compilation be replaced
> with set of nested passes.
> The current way the IPA passes are called seems wrong to me. I
> would have done this way (which might be what you had in mind really):
> for each pass
> 	for each (global) variable
> 		execute analysis variable function
> 	for each function
> 		execute analysis function function
> 	
> 	execute execute function
> 	execute subpasses (does this loop for the sub passes)
> 
> 	for each (global) variable
> 		execute modify variable function
> 	for each function
> 		execute modify function function
> 
> This is different than what we currently do which seems very wrong:
> for each function
> 	for each pass
> 		execute analysis function function
> 
> for each pass
> 	execute execute function
> 
> for each each (global) variable
> 	for each pass
> 		execute analysis variable function
> 
> for each function
> 	for each pass
> 		execute modify function function
> 
> for each each (global) variable
> 	for each pass
> 		execute modify variable function

Hmm, we do this?  Might be typo while placing the execute pass, it
definitly is supposed to happen after the variable analysis.
You have to do the variable analysis together with the function body
analysis as they are discovering more functions/variables to look at.
> 
> If I get time later today I will try to implement the idea of having
> only one pass list with sub passes.

This is on my TODO list too, so if you beat me while I am in Japan I
definitly won't mind ;))

Honza
> 
> Thanks,
> Andrew Pinski
> 



More information about the Gcc-patches mailing list