[VTA] first step in turning debug insns into debug notes

Alexandre Oliva aoliva@redhat.com
Wed Apr 2 06:39:00 GMT 2008


The last major block still missing in the VTA branch was making use of
the information carried throughout compilation in the form of debug
stmts and insns into the debug notes emitted by the var tracking
pass.

This patch begins fixing this problem.  It's still a very limited
solution (early prototype, if you will), in that:

- the merging of information from incoming edges is not implemented
correctly (or at all), and it doesn't associate incoming values from
other blocks with input references within the block that can be shown
to be incoming.

- it doesn't quite propagate value information across basic blocks, or
rather, it doesn't use the propagated information to emit debug notes.

- it drops expressions or locally-constant values from debug
information, because there's no way to encode them in location lists,
and there's no extension implemented for that yet.

- it skyrockets the amount of memory needed to build some libjava
stuff, I'm yet to see whether there's something severely broken or if
I need to work on far more compact representations.

- it doesn't take note at all of shared locations that might require
some alternate representation, such as ensuring that if multiple
variables are at the same location, none of them are treated as
modifiable, or at most one of them is, or something like that.

Nevertheless, it already emits far better debug information for the
testcases at http://gcc.gnu.org/wiki/Var_Tracking_Assignments

IIRC the debug information is already correct with it, and the only
incompleteness is caused by the inability to represent constant or
computed values (rather than locations) in DWARF location lists.  That
said, it's been 2-3 weeks since I last looked at the results and spent
significant time on this project, and it actually feels like it was
much longer...

In spite of its early prototype status, I thought I'd contribute the
patch and check it in the branch, in case people are interested in
seeing what kind of improvements and shortcomings they run into.  I
meant to do it before leaving for the Bossa Conference, but I failed,
and I couldn't get back to it since I returned.  Sorry.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: vta-debug-insns-to-notes.patch
Type: text/x-patch
Size: 89997 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080402/ee1f2be6/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


More information about the Gcc-patches mailing list