<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Nemanja and Matthias,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for the reply. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I checked both Register Scavenger and LivePhysReg. It seems that both work on the BasicBlock level, right? </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Is it possible to perform such analysis in a whole function? For example, considering the calling convention (where the rsi, rdi will be in use from the beginning) and the return convention (where rax will be in use in the last bb).</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Hu Hong</div></div></div></div>
<br><div class="gmail_quote">On 20 January 2017 at 03:55, Matthias Braun <span dir="ltr"><<a href="mailto:mbraun@apple.com" target="_blank">mbraun@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>There is also the LivePhysReg facility that I would recomment if you just want to query for a free register and do not need the full feature set of the RegisterScavenger.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>- Matthias</div></font></span><div><div class="h5"><br><div><blockquote type="cite"><div>On Jan 19, 2017, at 5:50 AM, Nemanja Ivanovic via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_1628503878704883635Apple-interchange-newline"><div><div dir="ltr"><div>I believe what you're after is the register scavenger.<br></div><div>It's in: include/llvm/CodeGen/<wbr>RegisterScavenging.h</div>Implementation: lib/CodeGen/<wbr>RegisterScavenging.cpp<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 19, 2017 at 1:36 PM, Hong Hu 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"><div style="font-size:small">Hi All,</div><div style="font-size:small"><br></div><div style="font-size:small">Given a machine instruction, is it possible to tell which register(s) is still not in use? </div><div style="font-size:small"><br></div><div style="font-size:small">For example, given one instruction A, if the one follows it (say B) defines register rax, then I can tell rax should spare at instruction A. </div><div style="font-size:small"><br></div><div style="font-size:small">The purpose is to use the spare register to replace registers used by A, for instrumentation purpose.</div><div style="font-size:small"><br></div><div><div class="m_1628503878704883635m_-6826991358958350244gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Hu Hong</div></div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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>
______________________________<wbr>_________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div>