[llvm-dev] Finding live values

Rob Lyerly via llvm-dev llvm-dev at lists.llvm.org
Sat Mar 26 12:52:10 PDT 2016


Hi Sanjoy,

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.

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].

[1] http://lists.llvm.org/pipermail/llvm-dev/2016-March/097509.html

On Thu, Mar 24, 2016 at 3:43 PM, Sanjoy Das <sanjoy at playingwithpointers.com>
wrote:

> Hi Rob,
>
> On Thu, Mar 24, 2016 at 12:35 PM, Rob Lyerly via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Hi everyone,
>
> > I'm writing a pass that inserts the llvm.experimental.stackmap
> > intrinsic into the IR, and I'd like to record the locations of *all*
> > live values whenever I insert the intrinsic (all this entails is
>
> What is your definition of a live value?  Some more context on what
> you intend to do with stackmaps will be helpful too.
>
> LLVM has a restricted form of a live value analysis that in the
> RewriteStatepointsForGC pass, and its intended use is to rewrite LLVM
> IR in a way that it can work with a precise compacting garbage
> collector; but it looks like you want something more general?
>
> > adding values as arguments to the intrinsic).  Is there any
> > pre-existing analysis pass which can give me the live values at a
> > given instruction in a basic block?  Or do I need to write an analysis
> > pass to calculate this information?
>
> -- Sanjoy
>



-- 
Rob Lyerly
Graduate Research Assistant, Systems Software Research Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160326/9c16745b/attachment.html>


More information about the llvm-dev mailing list