[Flang-dev] [llvm-dev] RFC: Adding debug information to LLVM to support Fortran

Eric Schweitz (PGI) eric.schweitz at pgroup.com
Fri Nov 2 12:15:12 EDT 2018

CC: flang

-----Original Message-----
From: aprantl at apple.com <aprantl at apple.com> 
Sent: Thursday, November 01, 2018 4:40 PM
To: Eric Schweitz (PGI) <eric.schweitz at pgroup.com>
Cc: llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] RFC: Adding debug information to LLVM to support Fortran

> On Nov 1, 2018, at 4:26 PM, Eric Schweitz (PGI) <eric.schweitz at pgroup.com> wrote:
> Hi Adrian,
> Thank you for the quick reply.
> (1) I agree. We’re running out of bits there. Furthermore, I have encoded these flags in a recycle-minded way to skirt the issue.
> (2) I will take a look.  Note that Fortran debuggers expect 
> DW_TAG_string_type for CHARACTER; and, they are distinct from arrays 
> of INTEGER*1.  (Yes, the conflation of string and CHARACTER terms is 
> unfortunate.)
> (3) The Fortran DI name choice was to deliberately keep things separated.  That may not be necessary as we move forward, but it was good at the time for sanity’s sake.
> (4) My understanding is the @llvm.dbg.declare !DIExpression is to track the location of a local variable. The !DIExpression in the lower (or upper) bound is intended as a way to describe how to find or compute the bound’s value from the array descriptor “variable” (computed from a member of a hidden argument to the function). The distinction isn’t entirely clear in the example.

There probably should be one artificial variable per computed property of the array, the respective bounds refer to their own variable and if an expression is necessary it should be tied to the DIVariable using dbg.value/dbg.declare (which I think you'll need anyway).

-- adrian

> I’ll work on getting the patches put up. Thanks again.
> --
This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

More information about the flang-dev mailing list