[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?
John Criswell
criswell at illinois.edu
Wed Mar 13 09:14:47 PDT 2013
On 3/13/13 4:06 AM, Steven Su wrote:
> Hello, could any one point me following question.
Without any context, your question is difficult to answer. Are you
building a points-to analysis and wanting to know how an alias analysis
might encode the fact that a pointer could alias any other pointer?
-- John T.
>
> e.g:
> 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:
> e.g2:
> 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?
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list