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
%1 = stoppoint(%0)
%2 = stoppoint(%1)
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
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.