Message ID | CY5PR21MB3542346DCE5393A1BEDAB13E91569@CY5PR21MB3542.namprd21.prod.outlook.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp339044wrs; Thu, 29 Sep 2022 23:28:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7BKfcxeeQ0M9QoRC2w0+t6Yvb8DBQj9HdiQUkdJALQecWnGrcZKwWdwBNJ357fu0gdeNsu X-Received: by 2002:a17:907:7206:b0:783:1d78:6249 with SMTP id dr6-20020a170907720600b007831d786249mr5425202ejc.9.1664519330371; Thu, 29 Sep 2022 23:28:50 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ds12-20020a170907724c00b00782e85ae302si1222389ejc.574.2022.09.29.23.28.50 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 23:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=j2P6kMII; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 234A238515F3 for <ouuuleilei@gmail.com>; Fri, 30 Sep 2022 06:28:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 234A238515F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664519329; bh=1pFdEGLO/4rsf9npbltqGXkHaT5umMrva2E2rZm2S8g=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=j2P6kMIIW3l6SfuSEuRArPByxgxKL56nIrAjUWN0HoQXVhFCBWjR7slM/j6lO5VwP 94EOoeBAxlWs2CRCNSqetyNMEVPzvxlmLI7XwVQn4DuJ57PUFTn2fUCdgY3GAG9fbu MdeJhYfChtDwVXCFYAnOJOIMcNGItcza8jlkG5Vw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2134.outbound.protection.outlook.com [40.107.220.134]) by sourceware.org (Postfix) with ESMTPS id B85483854156 for <gcc-patches@gcc.gnu.org>; Fri, 30 Sep 2022 06:28:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B85483854156 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UbEPR/9T/OdK3pN39ucI91YortaoudbQltUvsmgQl1YThWMuyqGL7jdGoK6OGbafz0kqYmLETCl6UGlttj3Hc6Mmm2GgEVgkwwMUQDSS46lb4mny9GzHdEvk0lEnq2/BbqmZF9hnOpon7XuOfMlcFdndj5QiCrZdHVOc53uHHfg8e7DKR7YfOVicFW/XypQkJDY8NVxSs5/E9ppJ7msSVYoo88wP2sbJ7xzR70UrZcg9ohigJRrj+AOSl4vU/qzoJlGZNTXc5aPUs9nRFuAz7oiqZWNIQzKGcJZQ+oel4nFZ6yq2ezeGVQTbHOX9Z3vSttck6gjn+TCzs6kCz1KHXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1pFdEGLO/4rsf9npbltqGXkHaT5umMrva2E2rZm2S8g=; b=nG1kdsrVXGcSdNrKbdKfw/xHO1RnJs0+RlmXIfWQIX5aB1FkGTGwYdSsgqUl4VbdXGs4VevCWrSXxqKIWzK9q6dAGlaFJsR7t6Bguo34wCzf9xZGlPRviPjqb0yb+nyZFxyuegV3odiKaLqtVDE1bsoYF5A/9nOCiLtB5YEjZmWpQ/piHsNFgOsVzL5GGWAhNCJ60XeitqC44nR8fcj2Tqtqbf5/m3WomaAQ0wOIE5HgR3dzEj+zPugQjU/T9MijmhISdWuqOyC8BoQp3bVLT8xhnN/Pm80Y4dM8MrZ6xY5K+TOTRhR08CqhHDkNgq6z8BEaIu2xo6TaeOfLM0bIXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none Received: from CY5PR21MB3542.namprd21.prod.outlook.com (2603:10b6:930:d::7) by MN0PR21MB3750.namprd21.prod.outlook.com (2603:10b6:208:3d0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.0; Fri, 30 Sep 2022 06:28:01 +0000 Received: from CY5PR21MB3542.namprd21.prod.outlook.com ([fe80::38ea:b9c1:41a7:b0ec]) by CY5PR21MB3542.namprd21.prod.outlook.com ([fe80::38ea:b9c1:41a7:b0ec%3]) with mapi id 15.20.5709.001; Fri, 30 Sep 2022 06:28:01 +0000 To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com> Subject: [PATCH] Emit discriminators for inlined call sites. Thread-Topic: [PATCH] Emit discriminators for inlined call sites. Thread-Index: AdjUZ8+SE5JcTNoxRfKd6mFHMuJ8og== Date: Fri, 30 Sep 2022 06:28:01 +0000 Message-ID: <CY5PR21MB3542346DCE5393A1BEDAB13E91569@CY5PR21MB3542.namprd21.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=f5469789-8939-46e8-a49a-46ff44f48dd3; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-09-30T00:50:50Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY5PR21MB3542:EE_|MN0PR21MB3750:EE_ x-ms-office365-filtering-correlation-id: 9b552861-6a74-4551-3be6-08daa2acec73 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: c7AgKqTiMVtMVQgINxjMeISSka+E2LXqyC4B2ulsT/+Q6mVWM4Uxtz1GxsZWhobARJSmYVhDoImGs8AD4aaNUzl6HTSlaDB9UDW2TeBL6OYukkTeLXQ9h/h4dwCs+jOtxcYGd2JdAWc8MRWhnwmB23F6Z1lk1OoB2MjiCwapI68rF8MgqFI1CUg4C1t2pNa9pPSpBmGtydjkWiUiSarPwvqk2HyqZOPIlh3Eby3fEw9Bp2y79RG4NOOW3CEiIiGKutV7Iip5i65fFKGCWj+LDLwhT6aIX96Mjl2BVKsSKV2E+4QZl4p/vCT6eSrHZNdQwyLrJeJAhvKS1TQDtVyJN1AabBn7EPWTjt3KM+0QbaaF3YIhE7/3A7WQspBCadbmtKINKZLtLB93OoGNTIvR6KPOgffxKoOHhSb2El96UNMguJOmEQbPm/9vmlEkWGD4lF55WPRUC6encYpZ2Ycw1yP3mM0zu3hYnxqnlMxQFRzk36AEyWEkju3vhLJYLSVEkr+4ELI3rXnjzvWR+HmxmZXmiTaXfl6wME3r/kYLEvIj7CZeOHUUsx7jel3g8TzMjHwHG4O1gLLf9ZpJmFYcyUUiBXE1cHxD2O7kMEIk9B21A+gv7v1ygniZyO/Euasy7QnjQikOq8goucrU0lVpNpdz00AlL2vGuF7bWW/HLwRhBv4vJCgzHjcP7YqF3dMDCrmxx+I80m5FaB7SuUoehR9qT5juZ+f8BWD1ybFFUXUDLPLO9E1c9fgPdfmjIvDJAhcjp3umO2YrNr+GHOCY2Hjn/h+Zh/tGRnjV9+dBfk2QjJwrSVl+0mh4Zhv6XsWy x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY5PR21MB3542.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(366004)(396003)(376002)(136003)(39860400002)(451199015)(110136005)(66556008)(66946007)(10290500003)(66446008)(55016003)(316002)(8676002)(64756008)(76116006)(66476007)(478600001)(38070700005)(71200400001)(2906002)(83380400001)(122000001)(52536014)(82960400001)(5660300002)(38100700002)(82950400001)(7696005)(6506007)(9686003)(41300700001)(86362001)(8990500004)(8936002)(33656002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: BnZXehR6BVAbjvwZmny1MFVEiYWMa85TGXF8VY0DCxSvKHhMDRRJHbJIVnAKKWiTP+0s8diZYMC8Zw8e9Qcx+XuHUgnrXtQh8qW5SBt+VIVn1+EU0vLA++9RzKJY+sbPKEQS9unL4qBgREO5s4UnDbHxZHgQcrC5WgAMAVfVqbmhSApIpaapvkfTB2hI/qdxXR7HBgXmnK9c1UBXAGWFL+YfqHIr4RTh1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QtNdBwrQFbfC0TcJlLk0Q+MOXhgGMgzjuKxml+P+MbwAOF1w0c27uaVq/G6+GuwDuvgr9rmoqWbAnOL3pL3kJuNlACDFBgw3oyrkOZm8y8MxlZyxAWLaO+zZkem7aF/vWSgyy988D54uZHCoUYnmM8Ztz/vyKsnoUt6X0RANW8tVIsB5IDBFGAKKiDQI9MKwPodqiLLt3U2zv4YewMlmHZ0CCDN67TbXZZwAfBzwntA+u1uA5ba4ciee8KkKd0xYCWa4j8DhM/CXld+vUceb2fCXO3ucwi4qUXpDKKGsF5rUaWUGB70kt8KaV7bc+O50pChuyE0c56kc8wf5HHMXfoOhum+uH2OT4rKHKpF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY5PR21MB3542.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b552861-6a74-4551-3be6-08daa2acec73 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2022 06:28:01.0927 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ly4y9YrNzAvpwBHaI65bTbMlYPjmNrbk6kQd6xlA5CM2DiZJc8OzReiZ5Hjg4Ri6iv/GCGJDkHTIYbdzqYCKwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR21MB3750 X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Eugene Rozenfeld via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745375021565128706?= X-GMAIL-MSGID: =?utf-8?q?1745375021565128706?= |
Series |
Emit discriminators for inlined call sites.
|
|
Commit Message
Eugene Rozenfeld
Sept. 30, 2022, 6:28 a.m. UTC
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(-) -- 2.25.1
Comments
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
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); } }