Re:Pointer Alias Analysis

ghiya@vani.cs.mcgill.ca (Rakesh GHIYA)
Tue, 8 Feb 1994 07:09:26 GMT

          From comp.compilers

Related articles
Pointer alias analysis? sesha@chanakya.csa.iisc.ernet.in (R Seshadri) (1994-02-05)
Re:Pointer Alias Analysis ghiya@vani.cs.mcgill.ca (1994-02-08)
| List of all articles for this month |
Newsgroups: comp.compilers
From: ghiya@vani.cs.mcgill.ca (Rakesh GHIYA)
Keywords: optimize, analysis, bibliography, FTP
Organization: Compilers Central
References: 94-02-036
Date: Tue, 8 Feb 1994 07:09:26 GMT

sesha@chanakya.csa.iisc.ernet.in (R Seshadri) writes.....


>I am doing aliasing analysis on language C and Fortran 90 as part of my
>M.E thesis. Most of the aliasing analysis I have seen does not take care
>of pointers to array locations.


>For example, Aliasing output doesn't distinguish between the below
>statements.
>
> int *a,b[10];
>
> a = &b[0];
> a = &b[5];
>
> If the range of arrays can be properly incorporated in the
>aliasing analysis then probably this analysis can be done. Has anybody
>done any work in this regard?


----------------------------------------------------------------------


The interprocedural points-to analysis implemented in the McCAT C compiler
at McGill by Maryam Emami, distinguishes between the assignments:


  a = &b[0] and a = &b[i] where i is not statically known.


In the first case, the information is 'a definitely points-to b' while in
the second case it is 'a possibly points-to b', as pointer 'a' is not
properly aligned with the array 'b'. If pointer arithmetic is performed on
'a' , it is assumed that its target still remains within the bounds of
array 'b', but 'a' is now considered to be possibly pointing-to 'b'.


Our compiler uses the notion of abstract stack to do points-to analysis
for stack-allocated data structures, and we have two abstract stack
locations for each array: array_first to represent the first array element
and array_middle, to represent the rest of the array.


For further details, you can have a look at:


'Context-Sensitive Interprocedural Points-to Analysis in the Presence of
Function Pointers. Maryam Emami, Rakesh Ghiya and Laurie J Hendren'. ACAPS
Technical Memo 54.


It is available via anon ftp from
wally.cs.mcgill.ca:pub/doc/memos/memo54.ps.gz . It would also appear in
the Proceedings of SIGPLAN PLDI '94 Conference.


You can also look at Maryam's Master's thesis on points-to analysis:
wally.cs.mcgill.ca:pub/doc/thesis/emami


Internet address of wally:132.206.3.30




Hope this helps.


Rakesh Ghiya
School of Computer Science
McGill University
Montreal, Canada.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.