[llvm-dev] How could I get some semantic information from IR?
周书林 via llvm-dev
llvm-dev at lists.llvm.org
Thu Dec 24 19:11:42 PST 2015
I am working on my first llvm Pass to analyze some structure variables in
source code, but in IR, there are only getelementptr to calculate the
memory address to fetch the value of a specific member in the structure.
For example, when I try to get the member name of Structure S in statement
"if(ss.aaaa == b)", where ss is a object of Structure S and b is an
integer,
[image: 内嵌图片 2]
[image: 内嵌图片 4]
I can only get the following IR structures, and the variable %aaaa1 is just
a temporary name
[image: 内嵌图片 1]
So, the problem is, how could I get the member name of a structure in IR?
more specific, how could I get the name "aaaa" while access to the
"ss.aaaa"?
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151225/30e97323/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-1.png
Type: image/png
Size: 22134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151225/30e97323/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-3.png
Type: image/png
Size: 3263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151225/30e97323/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-2.png
Type: image/png
Size: 1302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151225/30e97323/attachment-0002.png>
More information about the llvm-dev
mailing list