proposal for compilation unil wide alias analyis

Kenneth Zadeck zadeck@naturalbridge.com
Mon Jun 28 13:18:00 GMT 2004


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
>  
>



More information about the Gcc mailing list