[llvm-dev] Alias set with only one element having may-alias property
Nema, Ashutosh via llvm-dev
llvm-dev at lists.llvm.org
Tue Sep 22 03:37:48 PDT 2015
Looks like missing some basics here.
Consider following test:
1 int escape(int **ptr);
2 int foo(int * ptr)
3 {
4 return escape(&ptr);
5 }
At line number 4 address of pointer passed to another routine.
When I print alias set:
Alias Set Tracker: 1 alias sets for 1 pointer values.
AliasSet[0x43be490, 2] may alias, Mod/Ref Pointers: (i32** %ptr.addr, 8)
1 Unknown instructions: i32 %call
Here ptr.addr is only in the set, and set property is may-alias.
I'm not sure it may-alias with what, if its aliasing with self then why not must-alias ?
Is may-alias indicating ptr.addr is unsafe to optimize, and it can possibly alias with something.
Regards,
Ashutosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150922/ca9af4ec/attachment.html>
More information about the llvm-dev
mailing list