This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-profiling/RFC] Extending passmanager to deal with IPA passes
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Thu, 11 Nov 2004 12:29:46 -0500
- Subject: Re: [tree-profiling/RFC] Extending passmanager to deal with IPA passes
- References: <20041025091302.GN21413@kam.mff.cuni.cz>
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
If I get time later today I will try to implement the idea of having
only one pass list with sub passes.
Thanks,
Andrew Pinski