<div dir="ltr"><div>Hi Quentin,</div><div><br></div><div>Well what I'm trying to do is that, given a (maybe really big) set of particular points Pi, find out all the SSA variables Vi that are live at these points (i.e. def(Vi) dom Pi and at least one use(Vi) is reachable from Pi). The problem with classic def-use chains and dominance property is that I have to do this query for each point Pi and each variable Vi, which does not scale for big programs or for big set of particular points.</div><div><br></div><div>Cheers,</div><div><br></div><div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 7, 2019 at 8:13 PM Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi,<br><div><br><blockquote type="cite"><div>On Mar 6, 2019, at 9:58 AM, Son Tuan VU via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="gmail-m_3872445694859716428Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div><div>I found this thread back in 2014 [1] . Does anyone know if there has been any attempt to answer this request?</div><div><br></div><div>To clarify, I am looking for an analysis that computes the textbook definition of variable liveness: "given a SSA value V and a point P, is there a possible path from P to any use of V?" which is equivalent to "is V live at point P?"</div><div><br></div><div>I can write something myself (and will if need be), but just want to avoid reinventing the wheels in case improvements have been made since 2014. If not, what's the best way to contribute this analysis to LLVM? I mean, for example, is "Computing Liveness Sets for SSA" by Boissinot  [2] efficient enough to be implemented in LLVM?</div></div></div></div></div></div></blockquote><div><br></div><div>This one should be efficient enough.</div><div>That said, what are you trying to achieve?</div><div><br></div><div>The reason we don’t have such algorithm in LLVM IR is because we don’t need it. Usually def-uses chains and dominance property are enough for what the optimizers want to do.</div><br><blockquote type="cite"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div> Or should I find a better algorithm to solve this?<br></div><div><br></div><div>[1] <a href="http://lists.llvm.org/pipermail/llvm-dev/2014-July/074793.html" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2014-July/074793.html</a></div><div>[2] <a href="http://hal.inria.fr/docs/00/58/53/03/PDF/RR-7503.pdf" target="_blank">http://hal.inria.fr/docs/00/58/53/03/PDF/RR-7503.pdf</a><br></div><div><br></div><div>Thanks for your help,</div><div><br></div><div>Cheers</div><div><br></div><div></div><div><div><div dir="ltr" class="gmail-m_3872445694859716428gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div></div></div></div></div></div>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></blockquote></div>