* [PATCH] middle-end: Pretty-print address space of aggregates
@ 2021-02-26 12:02 Julian Brown
2021-03-02 22:21 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Julian Brown @ 2021-02-26 12:02 UTC (permalink / raw)
To: gcc-patches
It's possible for an aggregate to be declared in a non-default address
space, but the tree pretty-printer doesn't currently show that address
space in dumps, which can be confusing. This patch adds printing of
"<address-space-N>" markers for aggregates in non-default address spaces.
OK (now or for stage 1)?
Thanks,
Julian
ChangeLog
gcc/
* tree-pretty-print.c (dump_generic_node): Emit non-generic
address space info for aggregates.
---
gcc/tree-pretty-print.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 986f75d1d5f..909708e80c3 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -1937,6 +1937,13 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
if (quals & TYPE_QUAL_VOLATILE)
pp_string (pp, "volatile ");
+ if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node)))
+ {
+ pp_string (pp, "<address-space-");
+ pp_decimal_int (pp, TYPE_ADDR_SPACE (node));
+ pp_string (pp, "> ");
+ }
+
/* Print the name of the structure. */
if (TREE_CODE (node) == RECORD_TYPE)
pp_string (pp, "struct ");
--
2.29.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] middle-end: Pretty-print address space of aggregates
2021-02-26 12:02 [PATCH] middle-end: Pretty-print address space of aggregates Julian Brown
@ 2021-03-02 22:21 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2021-03-02 22:21 UTC (permalink / raw)
To: Julian Brown, gcc-patches
On 2/26/21 5:02 AM, Julian Brown wrote:
> It's possible for an aggregate to be declared in a non-default address
> space, but the tree pretty-printer doesn't currently show that address
> space in dumps, which can be confusing. This patch adds printing of
> "<address-space-N>" markers for aggregates in non-default address spaces.
>
> OK (now or for stage 1)?
>
> Thanks,
>
> Julian
>
> ChangeLog
>
> gcc/
> * tree-pretty-print.c (dump_generic_node): Emit non-generic
> address space info for aggregates.
Given this can't affect code generation, I think it's fine now.
OK for the trunk.
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-02 22:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 12:02 [PATCH] middle-end: Pretty-print address space of aggregates Julian Brown
2021-03-02 22:21 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).