[llvm-dev] Find all assignment for pointer variables
Kai Wang via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 27 19:30:34 PST 2016
Hi all,
In my case, I want to find all assignment instructions for pointer
variables.
For example,
int *d, *c;
*d = *c;
I want to know there is an assignment between *d and *c.
Here is the IR:
%3 = load i32** %c, align
%4 = load i32* %3, align 4
%5 = load i32** %d, align 8
store i32 %4, i32* %5, align 4
There are some temp variable %3, %4, %5. Is there any way to find the
assignment "*d = *c" from IR?
Or should I look into clang AST?
Thank you.
--
Regards,
Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160127/0cedfd55/attachment.html>
More information about the llvm-dev
mailing list