[llvm-dev] LLVM Alias Analysis problem

Артём Вопилов via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 14 04:47:23 PST 2018


Dear LLVM developers,

My name is Artem Vopilov, I am a student at TU Darmstadt. I am writing to you again to ask about Alias Analysis.

Now I attached IR code and C code of program I analyze with Alias Analysis.

Running commands "opt -analyze -aa-eval -print-all-alias-modref-info" and for printing sets of alias "opt -analyze -aa-eval -print-alias-sets" gives me the results, that in main function variables %a, %0, %2, %4 alias.

However I expected from Alias Analysis to indicate that pointers which point to same memory location alias, namely, %ptra and %ptrb.
I learnt from your last messages, that  "A pointer is just a variable containing memory address, so pointer itself will never alias with other pointers, but the ‘pointee’ will alias with other memory addresses."

My goal is to find sets of pointers, that point to the same memory locations.
Am I right, that with Alias Analysis I cannot accomplish my aim? Is it possible to achieve it using LLVM?
Thank you.

I am looking forward to hearing from you!

Respectfully yours,
Artem Vopilov
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_IR.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181214/8bf6d1b1/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text.c
Type: text/x-c
Size: 432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181214/8bf6d1b1/attachment.bin>


More information about the llvm-dev mailing list