<div dir="auto"><div>Hi Anurag,<div dir="auto">I assume you would like to have the moment traced at real-time during a real execution. Wouldn't better to rely on the Interpreter class and relying on the various visit methods?</div><div dir="auto"><br></div><div dir="auto">Thanks</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 26, 2019, 16:32 Anurag Chakraborty via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I am trying to write an llvm pass, that detects whether any instruction is allocating,reading or writing to memory. If it is doing so, I extract the address of that memory location, and identify the next time, this memory location is again accessed.</div><div>For this, I am iterating over the .ll IR file generated from the program, and using mayReadOrWriteMemory() to check whether any memory access is being made (for alloca instructions, I am just checking separately). If there is an access then, I iterate over the operand list using op_begin() and op_end() to get the memory address. But so far, I have been getting some ambiguous results.                                        Is my approach wrong ? Could someone please help me out here.</div><div>Thanks</div><div>Anurag</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></div>