This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: proposal for compilation unil wide alias analyis
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Mircea Namolaru <NAMOLARU at il dot ibm dot com>
- Cc: jh at suse dot cz, gcc at gcc dot gnu dot org, stuart at apple dot com, geoffk at apple dot com,mark at codesourcery dot com, dpatel at apple dot com, dnovillo at redhat dot com,dberlin at dberlin dot org, dje at watson dot ibm dot com, dalej at apple dot com,ronp at apple dot com, Razya Ladelsky <RAZYA at il dot ibm dot com>,Ayal Zaks <ZAKS at il dot ibm dot com>
- Date: Mon, 28 Jun 2004 08:43:00 -0400
- Subject: Re: proposal for compilation unil wide alias analyis
- References: <OFDAB522AA.876D1A7C-ONC2256EC1.003E2F55-42256EC1.00461752@il.ibm.com>
It depends on what you mean as IPA. For C and I assume Fortran, most
compilation is single file at a time (except when one is compiling for
benchmarks). What I noticed was that even at the file at a time mode,
in C, there was a significant amount of information that was being
thrown away.
I would assume that what you are doing is only going to get results for
compiling whole programs.
I could be wrong here, but the last time I looked at fortran, it had
fewer functions per file than C.
Having said that, there is certainly some benefit for pushing further
than where I am planning to go in the first spin of this which is
basically not even to look at how parameters are passed. Cooper Kennedy
is a good place to start.
I would like to see a patch of your code, just because you seem to have
found the right hooks to start implementing the analysis and that is
certainly my first task.
Kenny
Mircea Namolaru wrote:
We started to implement IPA constant propagation
(see http://gcc.gnu.org/ml/gcc/2004-06/msg00518.html) and also look into
some related IPA alias analysis issues.
As we understand it, your proposal targets static variables only.
Extending
the analysis to reference formal arguments may detect aliasing introduced
by
parameter passing (in Fortran this is the only way two variables can
alias).
Our IPA constant propagation handles exactly this case (constants
propagated
via parameters). It can be easily extended to handle reference parameters
also.
We thought of using the IPA/CP code as a base for detecting the aliasing
of
formal arguments (see Cooper and Kennedy - Fast Interprocedural Alias
Analysis,
PLDI 1989, and Muchnick, pages 642-654). This part could be complimentary
to
your analysis for static (global) variables. But maybe you intend to
implement
such an analysis differently at a later stage.
Regarding our IPA constant propagation, we also used flow insensitive
analysis.
We also faced the same problems regarding the intermediate representation:
we started with parse trees and are now using high level gimple on
tree-profiling branch. The intraprocedural analysis that we do is fairly
simple
and straightforward, so passing from one representation to another should
not
be much of a problem. The IPA constant propagation doesn't handle statics
(globals) so your analysis could probably help us extend it.
Mircea and Razya