On Fri, 2005-11-11 at 19:33 +0000, drizzle drizzle wrote: > Hi . > I want to use gcc's alias analysis in a standalone way. What I > observe is that a lot of the information is hidden because of > additional temporaries that have been generated. Can any one suggest > as to if there is a simple workaround to this ? > > To illustrate what I am saying > > for a stmt > heap_ptr= (int**) malloc the alias analysis tells me D.1072 points to > malloc and heap_ptr points to anything
You shouldn't see this, and in fact, i don't. #include <string.h> int main () { int **fooptr; fooptr = (int **)malloc (sizeof (int *)); return 0; } gives main () { intD.0 * * fooptrD.1403; intD.0 D.1405; voidD.28 * D.1404; # BLOCK 0 # PRED: ENTRY (fallthru) # HEAP.5D.1417_6 = V_MAY_DEF <HEAP.5D.1417_5>; D.1404_1 = malloc (4); fooptrD.1403_2 = (intD.0 * *) D.1404_1; D.1405_3 = 0; return D.1405_3; # SUCC: EXIT } D.1404_1 = { HEAP.5 } HEAP.5 = { ANYTHING } fooptr_2 = { HEAP.5 } IE we say that fooptr_2 points to HEAP. > . I would have liked to see > heap_ptr points to malloc. > Uh, > > Any way I can get that information..... > I would appreciate any idea/suggestions ... > dz