From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id EB455385C405 for ; Fri, 30 Sep 2022 12:32:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EB455385C405 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x633.google.com with SMTP id a26so8734662ejc.4 for ; Fri, 30 Sep 2022 05:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=8/4f8Uh+khVbKmBC9OyRtQUcbZgUgk2X0FfBXpVY6IY=; b=Ut0hj/2xvTYA+OJzAUsGa3BrTdUQuWllEN2EWW/F/JphUk6j5P7UEmjYv6b7lxuhj3 uiRDuY1L1yShsHekB+rKkR/a6tr/iVWOpbT0tqwMbh+CNdz71RavmD0MZXoa3K5Cab/T NeDJOxG4RaJnY4aIJP2sfnvwi/hvJVw3mprciHM0uoXjRRRwbxiM9g6duzVfryErL0nz RNdf+4FoOdL3a6q/wq5S0XhbMT7/l8aZsAy75+t+PboM4EbL0u1psKJgXQdW+xqNQ2/q uwxkgFY/0K1dQvlUgQMxKbXsLMLUxiyfHPEkFl6wWDtlq9WrJ7CWJyZHCS8O6WUUtatQ KhWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=8/4f8Uh+khVbKmBC9OyRtQUcbZgUgk2X0FfBXpVY6IY=; b=7d8ZPrTtedwRLEXpfQJFgnCUSqjogk1cBoHTdqnnyobMgOtHgPUsqIpnik4n5QDg6Y oVsFAII8H4qqt+4KSKMS+77A5krixxyUV+B9G9cZih4gcmv1oP/zjbahVBT/fvigoTN3 jW3PF9f0PX93nFDYWmXliO8JZj0tORI21xb3/N/RGv2Oa2uFeLYm1itfgmg+hKh8eSPp L0u5yAW3ANtOkp1vRhSgmR46p8r9OMQWi12VVI5jlhbjr4flHoZQwvm6TrV6pJKwYUxN T9GYpPMCaxNGDRAKO7m7vxvQhv6mo5dEbQPEicSE8t0pp1Oept+0ufuRfod16kzPrmJz IybQ== X-Gm-Message-State: ACrzQf0yVrFLDFdzs/ySqbquOaYgCAVPZIN+Ov1jt31zqlKCtVdFnf4Y C/fbTiev1LPHgpp6RtG0hY/I429N/UAbJcs17Og= X-Google-Smtp-Source: AMsMyM4Bruvyzx3uYmEsfqc9Cu1/GdYcboZ3k0wHYu/LYh9ml0nylG36IzlcgkVFSuD48kjmK2AJJT7Qx/l//dfOu6w= X-Received: by 2002:a17:907:7245:b0:782:331b:60f4 with SMTP id ds5-20020a170907724500b00782331b60f4mr6364118ejc.594.1664541156948; Fri, 30 Sep 2022 05:32:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Fri, 30 Sep 2022 14:32:24 +0200 Message-ID: Subject: Re: [PATCH] Emit discriminators for inlined call sites. To: Eugene Rozenfeld Cc: "gcc-patches@gcc.gnu.org" , Jason Merrill Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Sep 30, 2022 at 8:28 AM Eugene Rozenfeld via Gcc-patches 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