This is the mail archive of the gcc@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: Intermodule constant propagation


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


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