[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?

Steven Su steven_known at yahoo.com.cn
Wed Mar 13 02:06:15 PDT 2013

Hello, could any one point me following question.

	void foo(int * p)
  	    *p = 0;			
        Here 'p' may point to all memory location.
        Could you tell me how to represent the POINT TO set of 'p'?
        Here is my solution:
        Introduce a memory-class named: Global_Mem, then p pointed to global_mem. 
        And the MOD set of '*p=0' is Global_Mem.

But how to present the overlapping alias set:
        extern A[100];
	void foo(int * p, int i)
           *p = 0;
           A[i] = 10;  

'p' may point to anywhere. So p may point to A. How to describe the relation?

More information about the llvm-dev mailing list