[LLVMdev] debug stoppoints and control flow

Michael McCracken michael.mccracken at gmail.com
Wed Oct 13 19:20:35 PDT 2004


Hi, I'm just getting back to working on the cfe debug info after a brief hiatus.

It appears that the appropriate place to be inserting stoppoints is
starting in llvm_expand_stmt, using STMT_LINENO(t) . If that's not the
best place, comments would be appreciated.

Using the debug_hooks seems to be a non-starter, because they're
called during rtl generation, which apparently isn't done when
EMIT_LLVM is set.

A more pressing question is how to chain the debug intrinsics together
around control flow.
The current examples of debug info have no control flow except for
calls. I started with a simplistic version that chained them in file
order:

%1 = stoppoint(%0)
...
%2 = stoppoint(%1)
etc..

However, doing this obviously won't work with control flow, since an
instruction generated for one side of a branch may get linked to one
on the other side, resulting in instructions that don't dominate their
uses.

I wanted to ask if there was already a good explanation of what to do
somewhere (or off the top of someone's head) before I came up with one
on my own.

Thanks,
-mike

-- 
Michael McCracken
UCSD CSE PhD Student
San Diego Supercomputer Center
http://www.cse.ucsd.edu/~mmccrack/




More information about the llvm-dev mailing list