This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHES, PING*5] Enhance standard DWARF for Ada
- From: Jason Merrill <jason at redhat dot com>
- To: Pierre-Marie de Rodat <derodat at adacore dot com>, gcc-patches at gcc dot gnu dot org
- Cc: Cary Coutant <ccoutant at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Mon, 23 Nov 2015 16:08:07 -0500
- Subject: Re: [PATCHES, PING*5] Enhance standard DWARF for Ada
- Authentication-results: sourceware.org; auth=none
- References: <55A76C7B dot 7080303 at adacore dot com> <55B0C74D dot 3040907 at adacore dot com> <55BB53F3 dot 1080101 at adacore dot com> <55BB56B1 dot 8080407 at adacore dot com> <55C5C54E dot 8050700 at adacore dot com> <55E4025B dot 3050309 at adacore dot com> <5626A05D dot 3090905 at adacore dot com> <564CE0F7 dot 4060801 at redhat dot com> <56531A3E dot 40504 at adacore dot com>
On 11/23/2015 08:53 AM, Pierre-Marie de Rodat wrote:
Do you think the other patches could make it before the branch? (if they could, I will rebase+retest them as quick as possible).
Probably, yes. I can't find the DW_AT_static_link patch, though; it
doesn't seem to have been attached to your initial mail.
+ /* If we already met this node, there is nothing to compute anymore. */
+ if (visited.contains (l))
+ {
+#if ENABLE_CHECKING
+ /* Make sure that the stack size is consistent wherever the execution
+ flow comes from. */
+ gcc_assert ((unsigned) l->dw_loc_frame_offset == frame_offset_);
+#endif
+ break;
+ }
+ visited.add (l);
The 'add' function returns whether or not the set already contained the
entry, so you don't need to also call 'contains'.
+ /* The called DWARF procedure consumes one stack slot per argument
+ and returns one stack slot. */
+ tree func
+ = lookup_dwarf_proc_decl (l->dw_loc_oprnd1.v.val_die_ref.die);
+
+ frame_offset += 1;
+ for (tree args = DECL_ARGUMENTS (func);
+ args != NULL;
+ args = DECL_CHAIN (args))
+ frame_offset_--;
Can you avoid the new hash table by counting the
DW_TAG_formal_parameters instead of the DECL_ARGUMENTS?
Jason