[llvm-commits] Add scope info in DebugLoc
Chris Lattner
clattner at apple.com
Fri May 8 12:52:43 PDT 2009
> IR support would be ideal. Will it support line info as well ?
The goal is to move DebugLoc into the Instruction class (like it is in
MachineInstr), and encode into the 32-bit cookie information about
line numbers and scopes (regionstart/end info). This information
should include inline function information as well. The thought is
that this will make the debug information much easier to reconstruct
in the front-end and also makes it easy to preserve through the
optimizer. The outstanding question is how to encode debugloc in 32-
bit and retain this information. Something like the clang
SourceLocation approach should work, though I haven't had time to
think much about it.
On May 8, 2009, at 12:20 PM, Stefanus Du Toit wrote:
> On 8-May-09, at 1:25 PM, Evan Cheng wrote:
>> Eventually we'd like to move scoping information to the llvm IR
>> level.
>> But this seems like a good interim step. Bill can you review this
>> when
>> you have some time?
>
> Just curious, is this purely for debugging/profiling, or do you intend
> to use scope information to assist optimizations in some way?
This is metadata, so it should only be used for debug info,
diagnostics, etc. I'm also interested in adding explicit intrinsics
for "this memory location is dead/live here" but that will be an
explicit thing in the IR.
-Chris
More information about the llvm-commits
mailing list