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

Eric Schweitz (PGI) eric.schweitz at pgroup.com
Thu Nov 1 19:42:21 EDT 2018


---------- Forwarded message ---------
From: Sohail Somani (Fizz Buzz Inc.) via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>>
Date: Thu, Nov 1, 2018 at 3:35 PM
Subject: Re: [llvm-dev] RFC: Adding debug information to LLVM to support Fortran
To: <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>>


On Thu, Nov 1, 2018, at 6:27 PM, via llvm-dev wrote:

Regarding flags, I was just thinking that maybe we should invent a new DISubprogramFlags type.  DISubprogram already has a few bitfields for subprogram-specific things, Fortran will want 3 more, and there's no reason to fill up the generic DIFlags with more bits that are used in only one class.



I agree that the array stuff needs to be designed with an eye to handling how other languages do arrays, and leverage the common aspects.  Several languages have runtime-sized arrays and it would be nice to handle them all the same way.

However the CHARACTER type probably does want to be DW_TAG_string_type rather than an array. COBOL also has strings as a fundamental type.



I guess we'll have to learn what all the Fortran array stuff actually means now…

--paulr

May I suggest changing DIFlags from an enum to a simple int wrapper that behaves like an enum and can implement encoding? It is true that a lot of the bits are left unused in everyday contexts, so there is a possibility to encode more data.

For example:

DIFlags flags = FortranRelatedContext;

flags |= SomeFortranFlag;

So when assigning SomeFortranFlag the appropriate DIFlags operator would assert that the specific context is active.

I’ve had to extend DIFlags and in the end, just increased the size of the data type, but a clever encoding with a non-clever interface would halve memory usage currently used for DIFlags in my circumstance.

—
Sohail Somani
Fizz Buzz Inc.
Booking schedule: https://sohailsomani.youcanbook.me

_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
________________________________
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.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/attachments/20181101/4eddb462/attachment.html>


More information about the flang-dev mailing list