<div dir="ltr"><div><div>Debug metadata is generally the only way to link a byte of machine code back to the original source location. So that tools which understand the source language can help you see how your program runs. But even that is inaccurate.<br> <br></div><div>There is no other metadata linking assembly instructions back to any Value* in the intermediate representation. The goal of every optimisation is to make the whole program faster, not to keep track of how we got here. <br></div><br></div>There is often a huge difference between how you imagine something works, and how it actually works.<br><br>If you want a better answer, try to explain what you want to do and why. We aren't mind readers, and we can't piece together what you want from a description of how you imagine something works.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 3:59 AM, fami Hoseini via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I don't know if my question was super easy or maybe it is not clear. I'm still in need of the answer and appreciate any help.When LLVM creates assembly code it should somehow create instructions' program counter (offset) right? how to get this information?<div><br></div><div>Thank you,</div><div>Fateme<br><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 9, 2017 at 5:07 PM, fami Hoseini <span dir="ltr"><<a href="mailto:hoseini.f@gmail.com" target="_blank">hoseini.f@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>Is there a way to get instruction's offset at compile time with llvm for ARM?</div><div>I am trying to create a map between instructions at compile time and this run-time info. Since PC is a relative value, I am trying to use the instruction's offset as a constant property of instruction to create this map. I think offset information should be available to create the executable, if so where to find it?</div><div>Thank you for your help,</div><div>Fami</div></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>