Re: alias and pointers analysis

2007-11-14 Thread Diego Novillo
Fran Baena wrote: The issue i dont understand is why alias analysis is done before the SSA pass It isn't. You are reading very stale documentation. That was the status when we were only doing type-based alias analysis. You should read the current implementation and documents. See http:/

Re: alias and pointers analysis

2007-11-14 Thread Fran Baena
2007/11/13, Diego Novillo <[EMAIL PROTECTED]>: > On Nov 13, 2007 1:38 PM, Fran Baena <[EMAIL PROTECTED]> wrote: > > >1. Convert the function into GIMPLE form. Implemented in gimplify.c > > and c-simplify.c. > >2. Find variable references in the code. Implemented in tree-dfa.c. > >3. Bui

Re: alias and pointers analysis

2007-11-14 Thread Diego Novillo
deepak poola wrote: and i need to change the pointer assignments so that i can increment the assignmnets for reference counting can anybody suggest me or guide me regarding this You want to instrument every pointer assignment? You probably want to write a GIMPLE pass that looks for point

Re: alias and pointers analysis

2007-11-13 Thread deepak poola
hi, i have a some what similar confusion . i am trying to implement reference count algo for c. i need to knw how to manupulate pionters and which file i need to alter. for example if i have some statements like int *p,*q,a; p=&a; q=p; and i need to change the pointer assignments so that i can i

Re: alias and pointers analysis

2007-11-13 Thread Diego Novillo
On Nov 13, 2007 1:38 PM, Fran Baena <[EMAIL PROTECTED]> wrote: >1. Convert the function into GIMPLE form. Implemented in gimplify.c > and c-simplify.c. >2. Find variable references in the code. Implemented in tree-dfa.c. >3. Build a control-flow graph (CFG). Implemented in tree-cfg.c.

Re: alias and pointers analysis

2007-11-13 Thread Fran Baena
Hi again, i have been studing gcc docs to undestand SSA and steps to take to get SSA form. In one GCC online document: http://gcc.gnu.org/projects/tree-ssa/#ssa, the steps to translate to SSA form are listed. Here, i copy and paste the mentioned text: [] Conversion to SSA form is a three step

Re: alias and pointers analysis

2007-10-26 Thread Diego Novillo
On 10/26/07, J.C. Pizarro <[EMAIL PROTECTED]> wrote: > What is the matter if the 'b' var. is unused and > optimally removed by the SSA algorithm? In this case, it will not be removed. If any of the p_i pointers is ever dereferenced in this code, that will be considered a use of variable 'b'. >

Re: alias and pointers analysis

2007-10-25 Thread J.C. Pizarro
On 10/26/07, Diego Novillo <[EMAIL PROTECTED]> wrote: > SSA names of pointers are also pointers, when points-to sets are > computed for SSA names, what you get is all the symbols that the > particular SSA name has been found to point to. Eg, > > if (...) > p_1 = &a; > else > p_2 = &b; > endif

Re: alias and pointers analysis

2007-10-25 Thread Diego Novillo
On 10/25/07, Fran Baena <[EMAIL PROTECTED]> wrote: > * Why alias analysis? I mean, the pointers could be versioned like the > others vars. (I'm not saying it's not usefull, i mean i don't > understand the alias analisys goals) SSA names of pointers are also pointers, when points-to sets are compu