Also,

If Clang folks want to use the debug IR pass, here's a simple patch that
enables it by default. That is, with this applied, invoke clang as such:

$ clang blah.cpp -g -o blah
$ gdb ./blah

And you will see IR in your debugger. If this turns out to be a useful
feature, maybe I should add it as an option say "-gllvm" or something
along those lines?


Thanks,
Dan


On 2013-04-15 12:19 PM, "Malea, Daniel" <[email protected]> wrote:

>Ah, sorry, I figured phabricator link was sufficient. Here are the 4
>patches that represent the latest phabricator review:
>
>
>
>Part #1: FormattedStream -- Add line tracking
>- previously formatted_raw_ostream tracked columns, now it tracks lines
>too
>- used by DebugIR pass to know the line number to connect to each IR
>instruction
>
>Part #2: Pull up AssemblyWriter interface into header to allow subclassing
>- made all functions virtual so that subclasses can specialize them
>- add printInstructionLine so that subclasses can choose whether or not to
>print the newline character (without having to implement printBasicBlock()
>- no intended change in functionality/behaviour!
>
>Part #3: DebugIR -- emit IR file and replace source lines with IR lines
>in MD
>- requires existing debug information to be present
>- fixes up file name and line number information
>- emits a "<orig_filename>-debug.ll" succinct IR file (without !dbg
>metadata
>or debug intrinsics) that can be read by a debugger
>
>Part #4: DebugIR tests -- lit tests for the line number transform
>- simple one-function case
>- function-calling case
>- external function calling case
>- exception throwing case
>- vector case
>- O3 (vector) case
>
>
>
>
>From: Chandler Carruth <[email protected]<mailto:[email protected]>>
>Date: Monday, 15 April, 2013 4:29 AM
>To: Stefanus Du Toit
><[email protected]<mailto:[email protected]>>
>Cc: Nadav Rotem <[email protected]<mailto:[email protected]>>, Daniel Malea
><[email protected]<mailto:[email protected]>>,
>"[email protected]<mailto:[email protected]>"
><[email protected]<mailto:[email protected]>>
>Subject: Re: [PATCH] Debugging LLVM IR with LLDB (and gdb)
>
>On Mon, Apr 15, 2013 at 1:21 AM, Du Toit, Stefanus
><[email protected]<mailto:[email protected]>> wrote:
>The link to the patch is at the bottom of the email.
>
>As usual, please attach the patch to the email. The best way when using
>Phabricator (as we documented) is to add the commits list to the review
>there so that everyone on the mailing list can follow the code review and
>participate even if not using the specific tool.
>
>
>--
>Stefanus Du Toit 
><[email protected]<mailto:[email protected]>>
>Intel Waterloo
>Phone: 519-591-1738<tel:519-591-1738>
>
>
>From: Nadav Rotem 
><[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:
>[email protected]>>>
>Date: Sunday, 14 April, 2013 4:00 AM
>To: Daniel Malea 
><[email protected]<mailto:[email protected]><mailto:daniel.malea
>@intel.com<mailto:[email protected]>>>
>Cc: 
>"[email protected]<mailto:[email protected]><mailto:llvm-com
>[email protected]<mailto:[email protected]>>"
><[email protected]<mailto:[email protected]><mailto:llvm-com
>[email protected]<mailto:[email protected]>>>
>Subject: Re: [PATCH] Debugging LLVM IR with LLDB (and gdb)
>
>Hi Daniel,
>
>You forgot to attache the patch.
>
>Thanks,
>Nadav
>
>On Apr 11, 2013, at 1:53 PM, "Malea, Daniel"
><[email protected]<mailto:[email protected]><mailto:daniel.malea
>@intel.com<mailto:[email protected]>>> wrote:
>
>[Š]
>I'd be appreciative of testing and/or review comments! The patch is
>available on phabricator http://llvm-reviews.chandlerc.com/D659and the
>details from the review request follow.
>
>
>_______________________________________________
>llvm-commits mailing list
>[email protected]<mailto:[email protected]>
>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>

Attachment: 05_enable_by_default_in_clang.patch
Description: 05_enable_by_default_in_clang.patch

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to