Hi all, i am coding to analyze an IR with multi-level pointers, and i am eager to know whether there exists a way to find the pointee pointer directly, if only given an upper level pointer.
For example, in the following demo,
C code:
int i = 10;
int *p = &i;
int **pp;
*pp = &p;
IR code:
%i = alloca i32, align 4
%p = alloca i32*, align 8
%pp = alloca i32**, align 8
store i32 10, i32* %i, align 4
store i32* %i, i32** %p, align 8
%0 = bitcast i32** %p to i32*
If I know the value of pp already, Is there a fast method for me to find pointer p directly? And if not must I consider AA case here?
Thanks!
Best Regards,
Shen