* [PATCH] Emit discriminators for inlined call sites.
@ 2022-09-30 6:28 Eugene Rozenfeld
2022-09-30 12:32 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Eugene Rozenfeld @ 2022-09-30 6:28 UTC (permalink / raw)
To: gcc-patches, Jason Merrill
This change is based on commit 9fa26998a63d4b22b637ed8702520819e408a694
by Dehao Chen in vendors/google/heads/gcc-4_8.
gcc/ChangeLog:
* dwarf2out.cc (add_call_src_coords_attributes): Emit discriminators for inlined call sites.
---
gcc/dwarf2out.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 2df75904022..e81044b8c48 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -24783,7 +24783,8 @@ add_call_src_coords_attributes (tree stmt, dw_die_ref die)
if (RESERVED_LOCATION_P (BLOCK_SOURCE_LOCATION (stmt)))
return;
- expanded_location s = expand_location (BLOCK_SOURCE_LOCATION (stmt));
+ location_t locus = BLOCK_SOURCE_LOCATION (stmt);
+ expanded_location s = expand_location (locus);
if (dwarf_version >= 3 || !dwarf_strict)
{
@@ -24791,6 +24792,9 @@ add_call_src_coords_attributes (tree stmt, dw_die_ref die)
add_AT_unsigned (die, DW_AT_call_line, s.line);
if (debug_column_info && s.column)
add_AT_unsigned (die, DW_AT_call_column, s.column);
+ unsigned discr = get_discriminator_from_loc (locus);
+ if (discr != 0)
+ add_AT_unsigned (die, DW_AT_GNU_discriminator, discr);
}
}
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Emit discriminators for inlined call sites.
2022-09-30 6:28 [PATCH] Emit discriminators for inlined call sites Eugene Rozenfeld
@ 2022-09-30 12:32 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2022-09-30 12:32 UTC (permalink / raw)
To: Eugene Rozenfeld; +Cc: gcc-patches, Jason Merrill
On Fri, Sep 30, 2022 at 8:28 AM Eugene Rozenfeld via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> This change is based on commit 9fa26998a63d4b22b637ed8702520819e408a694
> by Dehao Chen in vendors/google/heads/gcc-4_8.
OK
> gcc/ChangeLog:
>
> * dwarf2out.cc (add_call_src_coords_attributes): Emit discriminators for inlined call sites.
> ---
> gcc/dwarf2out.cc | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
> index 2df75904022..e81044b8c48 100644
> --- a/gcc/dwarf2out.cc
> +++ b/gcc/dwarf2out.cc
> @@ -24783,7 +24783,8 @@ add_call_src_coords_attributes (tree stmt, dw_die_ref die)
> if (RESERVED_LOCATION_P (BLOCK_SOURCE_LOCATION (stmt)))
> return;
>
> - expanded_location s = expand_location (BLOCK_SOURCE_LOCATION (stmt));
> + location_t locus = BLOCK_SOURCE_LOCATION (stmt);
> + expanded_location s = expand_location (locus);
>
> if (dwarf_version >= 3 || !dwarf_strict)
> {
> @@ -24791,6 +24792,9 @@ add_call_src_coords_attributes (tree stmt, dw_die_ref die)
> add_AT_unsigned (die, DW_AT_call_line, s.line);
> if (debug_column_info && s.column)
> add_AT_unsigned (die, DW_AT_call_column, s.column);
> + unsigned discr = get_discriminator_from_loc (locus);
> + if (discr != 0)
> + add_AT_unsigned (die, DW_AT_GNU_discriminator, discr);
> }
> }
>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-30 12:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 6:28 [PATCH] Emit discriminators for inlined call sites Eugene Rozenfeld
2022-09-30 12:32 ` Richard Biener
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).