<div dir="ltr"><div><div>Hi Sanjoy,<br><br></div>I'm interested in being able to reconstruct stack frames at runtime.  In particular, I'd like to be able to unwind frames from a thread's stack and inspect the live values of each individual activation.  I'd like to be able to find all live values (whether they be programmer-defined variables or compiler-generated intermediates) at arbitrary, but statically-known, locations in the the code.  Right now, I need the locations of all live values at function call sites.<br><br></div>Note that this *should* be a solved problem using DWARF debugging information -- the only reason I'm investigating this route is because it seems that clang/LLVM produce bad DWARF info [1].<br><br>[1] <a href="http://lists.llvm.org/pipermail/llvm-dev/2016-March/097509.html">http://lists.llvm.org/pipermail/llvm-dev/2016-March/097509.html</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 3:43 PM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rob,<br>
<span class=""><br>
On Thu, Mar 24, 2016 at 12:35 PM, Rob Lyerly via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
</span><span class="">> Hi everyone,<br>
<br>
> I'm writing a pass that inserts the llvm.experimental.stackmap<br>
> intrinsic into the IR, and I'd like to record the locations of *all*<br>
> live values whenever I insert the intrinsic (all this entails is<br>
<br>
</span>What is your definition of a live value?  Some more context on what<br>
you intend to do with stackmaps will be helpful too.<br>
<br>
LLVM has a restricted form of a live value analysis that in the<br>
RewriteStatepointsForGC pass, and its intended use is to rewrite LLVM<br>
IR in a way that it can work with a precise compacting garbage<br>
collector; but it looks like you want something more general?<br>
<div class="HOEnZb"><div class="h5"><br>
> adding values as arguments to the intrinsic).  Is there any<br>
> pre-existing analysis pass which can give me the live values at a<br>
> given instruction in a basic block?  Or do I need to write an analysis<br>
> pass to calculate this information?<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">-- Sanjoy<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span>Rob Lyerly</span><br></div><div>Graduate Research Assistant, Systems Software Research Group<br><br></div><div><img src="http://www.branding.unirel.vt.edu/images/S_logo-tagline-old.jpg" height="40" width="140">   <img src="http://www.oocities.org/rainforestwind/divider_black_vertical.jpg" height="36" width="8"><img src="http://www.ece.vt.edu/images/inside-top-ecelogo.png" height="47" width="232"></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>