[LLVMdev] Source file information.
David Greene
dag at cray.com
Thu Jul 9 12:13:58 PDT 2009
On Thursday 09 July 2009 12:47, Devang Patel wrote:
> > Ick. So line number information is only available at debug stop points?
> > That's bad when compiling optimized code since the debug stops kill
> > optimization, don't they?
>
> We worked hard to avoid this. Now if a debug stop point threatens to
> kill optimization then the llvm optimizer will kill the debug stop
> point itself! We have updated optimizer in all cases we could find.
> (Try running nightly tester using TEST=dbgopt and TEST=ipodbgopt and
> report failures.) However this means, in optimized code you may lose
> location info here and there.
Great! Then this should work for us.
> > We have our own privately-maintained way of tracking line information
> > even in optimized code but it's a big hack and not something suitable for
> > pushing upstream.
>
> Would it be possible to describe the work here ?
To avoid altering every single constructor signature in LLVM, we maintain a
global variable with the current line number information and have the
constructors look at that when creating instructions during translation
to LLVM.
Yucky. :-/
> Now, each MI has line number info. The work is in progress to put
> debug info into LLVM instructions. The first step is to move away from
> all those pesky llvm.dbg.* GVs and use metadata.
Perfect. This should work great for us. Thanks for the explanation.
-Dave
More information about the llvm-dev
mailing list