This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Intermodule constant propagation
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Mircea Namolaru <NAMOLARU at il dot ibm dot com>
- Cc: "gcc at gcc dot gnu dot org list" <gcc at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, apinski at apple dot com, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Mon, 24 Nov 2003 00:28:07 -0800
- Subject: Re: Intermodule constant propagation
- References: <OF16C5B090.092F529C-ON42256DE8.002C25F8-42256DE8.002D2FA9@il.ibm.com>
On Nov 24, 2003, at 00:13, Mircea Namolaru wrote:
We would like to add several interprocedural optimizations to gcc,
starting
with constant propagation.
We are thinking of implementing a flow insensitive form of the
interprocedural
constant propagation algorithm described in [1][2], based on the new
intermodule code
(http://gcc.gnu.org/ml/gcc-patches/2003-05/msg01665.html).
We would appreciate any feedback regarding gcc interprocedural
optimizations
(work done or in development, potential problems etc).
Jan Hubicka and I were just talking about this on IRC today.
Here is the ideas both Jan and I agreed on (for the tree-ssa branch):
Have a flag called -fwhole-prgram which tells GCC that the whole
program is being compiled at this point and have variables which
were global be static.
Have the code in callgraph (aka cgraph.c) do some of the work:
Have cgraph_analyze_function to collect the assigments and uses
of variables.
And have any changes to the functions happen in cgraph_expand_fuction.
The down side at this point is that the trees here are in generic and
not
gimple but Jan is working on getting this problem solved.
I might have some work done by the end of the week on this front and
basic
constant propagation IPA.
Thanks,
Andrew Pinski
pinskia@physics.uc.edu
pinskia@gcc.gnu.org
apinski@apple.com