From: Keven Boell <keven.boell@linux.intel.com>
To: Joel Brobecker <brobecker@adacore.com>,
Keven Boell <keven.boell@intel.com>
Cc: gdb-patches@sourceware.org, Doug Evans <dje@google.com>
Subject: Re: [V4 01/18] vla: introduce allocated/associated flags
Date: Wed, 18 Feb 2015 15:54:00 -0000 [thread overview]
Message-ID: <54E4B5A7.8010506@linux.intel.com> (raw)
In-Reply-To: <20150209065213.GA15579@adacore.com>
On 09.02.2015 07:52, Joel Brobecker wrote:
> [Copying Doug, as I think Doug has experience in this area, and is
> also dealing with the kind of giant programs where size of types
> really make a big difference]
>
>> Fortran 90 provide types whose values may be dynamically
>> allocated or associated with a variable under explicit
>> program control. The purpose of this commit is to read
>> allocated/associated DWARF tags and store them to the
>> main_type.
>>
>> 2014-05-28 Keven Boell <keven.boell@intel.com>
>> Sanimir Agovic <sanimir.agovic@intel.com>
>>
>> * dwarf2read.c (set_die_type): Add reading of
>> allocated/associated flags.
>> * gdbtypes.h (struct main_type): Add allocated/
>> associated dwarf2_prop attributes.
>> (TYPE_ALLOCATED_PROP): New macro.
>> (TYPE_ASSOCIATED_PROP): New macro.
>> (TYPE_NOT_ALLOCATED): New macro.
>> (TYPE_NOT_ASSOCIATED): New macro.
>
> struct main_type is size-critical, so we simply cannot add
> fields to it that only a very small minority of instances
> will actually be using..
>
> To avoid the size increase, I propose that we turn...
>
> struct dynamic_prop *data_location;
>
> ... into a chained list of dynamic properties. To determine
> which type of property each element in the list is, we'll need
> to introduce an enumerated type to be used as discriminant.
>
> So, I propose something like that:
>
> /* FIXME: Add comment. */
>
> enum dynamic_prop_kind
> {
> /* FIXME: Document. */
> DYNAMIC_PROP_DATA_LOCATION,
> /* FIXME: Document. */
> DYNAMIC_PROP_ALLOCATED,
> /* FIXME: Document. */
> DYNAMIC_PROP_ASSOCIATED,
> };
>
> /* FIXME: Document. */
>
> struct dynamic_prop_list
> {
> enum dynamic_prop_kind kind;
> struct dynamic_prop *prop;
> struct dynamic_prop_list *next;
> };
>
> ... then replace...
>
> struct dynamic_prop *data_location;
>
> ... into ...
>
> struct dynamic_prop_list *dyn_prop_list;
>
> ... and finally adjust the macros to go through the list instead of
> accessing the data through the dedicated fields. Using a function
> which does the search for a given kind will probably be useful.
>
> I think you might find it easier to do it in 2 stages (and therefore
> two patches):
>
> 1. Convert the current "data_location" field to the list scheme;
> 2. Then add the two new kinds of properties, which should then
> be fairly straightforward.
>
Hi Joel,
Thanks for your reply. Appreciate the time you invested for reviewing the patches.
I will re-work this part to have the new attributes as a linked list as you proposed and will come up with an updated patch series.
Thanks,
Keven
next prev parent reply other threads:[~2015-02-18 15:54 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 13:49 [V4 00/21] Fortran dynamic array support Keven Boell
2015-01-14 13:49 ` [V4 01/18] vla: introduce allocated/associated flags Keven Boell
2015-02-09 6:52 ` Joel Brobecker
2015-02-09 23:37 ` Doug Evans
2015-02-11 8:44 ` Joel Brobecker
2015-02-11 17:36 ` Doug Evans
2015-02-18 15:54 ` Keven Boell [this message]
2015-01-14 13:49 ` [V4 04/18] test: evaluate dynamic arrays using Fortran primitives Keven Boell
2015-01-14 13:49 ` [V4 07/18] test: evaluating allocation/association status Keven Boell
2015-01-14 13:50 ` [V4 05/18] test: dynamic arrays passed to subroutines Keven Boell
2015-01-14 13:50 ` [V4 12/18] test: add archer dynamic other frame test Keven Boell
2015-01-14 13:50 ` [V4 06/18] test: correct ptype of dynamic arrays in Fortran Keven Boell
2015-01-14 13:50 ` [V4 15/18] vla: get dynamic array corner cases to work Keven Boell
2015-01-14 13:50 ` [V4 03/18] test: basic tests for dynamic array evaluations in Fortran Keven Boell
2015-01-14 13:50 ` [V4 16/18] vla: Fortran dynamic string support Keven Boell
2015-01-14 13:50 ` [V4 14/18] vla: use value constructor instead of raw-buffer manipulation Keven Boell
2015-01-14 13:50 ` [V4 09/18] test: accessing dynamic array history values Keven Boell
2015-01-14 13:50 ` [V4 18/18] vla: add NEWS entry for dynamic array support Keven Boell
2015-01-14 18:01 ` Eli Zaretskii
2015-01-14 13:50 ` [V4 17/18] vla: add stride support to fortran arrays Keven Boell
2015-01-14 13:50 ` [V4 11/18] test: test sizeof for dynamic " Keven Boell
2015-01-14 13:50 ` [V4 08/18] test: dynamic arrays passed to functions Keven Boell
2015-01-14 13:50 ` [V4 10/18] test: basic MI test for the dynamic array support Keven Boell
2015-01-14 13:50 ` [V4 13/18] vla: reconstruct value to compute bounds of target type Keven Boell
2015-01-14 13:50 ` [V4 02/18] vla: make dynamic fortran arrays functional Keven Boell
2015-02-09 7:09 ` Joel Brobecker
2015-02-18 16:02 ` Keven Boell
2015-02-22 4:23 ` Joel Brobecker
2015-05-28 20:36 ` [V4 00/21] Fortran dynamic array support Jan Kratochvil
2015-05-28 20:52 ` Joel Brobecker
2015-06-14 8:15 ` Jan Kratochvil
2015-06-17 11:42 ` Boell, Keven
2015-07-01 12:43 ` Keven Boell
2016-07-07 8:30 ` Jan Kratochvil
2016-07-07 9:16 ` Bernhard Heckel
2016-07-07 9:23 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54E4B5A7.8010506@linux.intel.com \
--to=keven.boell@linux.intel.com \
--cc=brobecker@adacore.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=keven.boell@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox