From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2132.outbound.protection.outlook.com [40.107.92.132]) by sourceware.org (Postfix) with ESMTPS id DE1023857C62 for ; Mon, 14 Sep 2020 18:20:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DE1023857C62 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G/GHJ12YRGT1Son2tpJuOlL8K3Bv6Oreecrv2Ir8DRsooaSyUCr0vcT3O+9ySHo4RY+D4z+omw+OFlmcbTgZWdqIJa/ym8dX60KfExSFL8p5kkBhkZmAJtnqUV8WuWd77c6melOX4ifKDC3lBi1RM+nPeD8lABi7+Syww1fCmM20rBlDAuk7QgXN4s1X3yAQOTT6Yp8pHtjqYWotvffMmImaubM1QlwEkmqXIezJ8BpMnGbeAtWUygNw4ex+8o1xcO5blr+UwWRQp9V2ENWooYJ+s4HBf7/PE8fQjZIsdQRVslVL2h16PS6dT0l5Wfp27r8xVozRWXo9+9n5WZZcNQ== 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-SenderADCheck; bh=HziMn6qoGm7JPSKChcK0BMIco1orWj6qV0mRStDGskc=; b=ZtV2ImzJgXNvcIDOVsLWyHfsUo1fyimM+V1cQkh+c+4L3lhqV/cMSSVRTsOIaolHM4UyGfBUIraBxpDIhqkiVxfd5649heREV/Rb3VLtIuXmiv8sNW6Rl+wmM4LN202FdmOPqDpgrlUf26aSzZZPh2jI4hKYi5dcI6iE7ggyLvfXMkOyvEWpfXp4vmPhGa0PwN39N0rglu3xX7nIXcPjf+DIdbI9Pnn2nJmqMU1E3rkFbslduQmNUOAEwYIrM3sHGVQob8n+LcZSwmKwP2hEMxTdBfS/Dq4LzQzavA9kHawLK9ILFKMOisCbmPzLk9otN9vTxKm/FuPf+WJdgmMkzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amperecomputing.com; dmarc=pass action=none header.from=amperecomputing.com; dkim=pass header.d=amperecomputing.com; arc=none Received: from BYAPR01MB5464.prod.exchangelabs.com (2603:10b6:a03:129::28) by BYAPR01MB3958.prod.exchangelabs.com (2603:10b6:a02:91::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Mon, 14 Sep 2020 18:20:27 +0000 Received: from BYAPR01MB5464.prod.exchangelabs.com ([fe80::44db:c140:1b6d:b023]) by BYAPR01MB5464.prod.exchangelabs.com ([fe80::44db:c140:1b6d:b023%7]) with mapi id 15.20.3370.019; Mon, 14 Sep 2020 18:20:27 +0000 From: Gary Oblock To: Erick Ochoa , "gcc@gcc.gnu.org" Subject: Re: Dominance information problem Thread-Topic: Dominance information problem Thread-Index: AQHWiNXDECQToaOn20azbg3/M+ScMalnuqGAgAC6p4w= Date: Mon, 14 Sep 2020 18:20:27 +0000 Message-ID: References: , <68b21e05-2939-599c-a2eb-edfd1bccf905@theobroma-systems.com> In-Reply-To: <68b21e05-2939-599c-a2eb-edfd1bccf905@theobroma-systems.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [69.181.250.88] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 568938e8-9d1f-477f-f5fd-08d858dadaec x-ms-traffictypediagnostic: BYAPR01MB3958: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qdWXZC50p003hW897h8RRFYQ7kIWCQHztTMLJS8ntpO4usUenlxlfsiuREBG/Kl0A8wj9aTdRxn5UTDKYjNXA1duzVxaP1G+qtzWXpGebtlqjfHkidZnCT105SsYXy68MukEewyenczug/X6WwMoIH58st6ov08Wfpn9EY0sSmJrSvZpxHutJw9US7067BgTmrEnpO/J21BL7Lios3AVquYDxlkKdrANzzu+kogmeS70IU/IxkMQuQCq3tW/iV80Dg/GX+t7rbJsNiswaB/+UU9pgPYb4zSGq6BaKrx+g6TXDRN8mUNIRx+43REvMfsiGLR237ZAmvE0lBXEJ0Audw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR01MB5464.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(39840400004)(346002)(396003)(366004)(26005)(55016002)(52536014)(71200400001)(186003)(478600001)(83380400001)(7116003)(110136005)(316002)(6506007)(53546011)(7696005)(2906002)(8676002)(8936002)(3480700007)(66446008)(64756008)(66556008)(66476007)(66946007)(33656002)(86362001)(9686003)(5660300002)(19627405001)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: XLOIA87Ayo4pmOX+lDAPelDPIe4bLzfAWQTTQYO/2HXcGI3iAUnIuUpHgmR4d8EendAc4SjHu1IM+rBAYqJ0XFra0lpC1bRDrDlHgUITY2iYOV4LalYz9j2R8OB1aSsLOBvs9pJ1CTYG4qdz5HR2I2dunwvWQUA4e+FWaLprtd4ChOd7DM8+ub8bVuq6bsreG57KSEStlRrz6hUQWModqUhdTTEuCfWG3jxKUZ2UYZ9cSz3QeTKSa+XbGi7g1Xrzc/Ts07yXIqv4L6tN6OcODE+e3+9A47RSTFoeIYlPxLFimuKo1qsF8FS50EQhxDga8aCDYMAEK6ounod/IdoRPOJrVozjo2J+QG1YYV5fGpJ+mqOkNnvkPc6mHiGL188Q6gIsbiA+yYgQWO0Vu2t34ionX92VAEKwNudH3aQYIXU68L4PCQSNYvuVLtb6/F5QGgIOvO0kOc0+v9/Hl1la4Cq22IznkYIf0Wb+4WPTC5sVxhTNAIzXKGfSbvlJWNP660koKtQqZwXbWl0KyEeusV9xoDSgbkAyLpBQqHxCgbEwz5Idj+92Jnbz1rrDdZf8K/wVCCAunhbyaUpyQlhCuZXRtPct+TP2em7mc+EFEgH00ci3gm8IaJSVWzLQgnC6/t3uI2UH7UIv8PndNkC3Wg== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: amperecomputing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR01MB5464.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 568938e8-9d1f-477f-f5fd-08d858dadaec X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Sep 2020 18:20:27.0783 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VzPQFlce6oFGkYUbUZAGUuJ5/2lt49JN9x2Jkvn6iPzwha8lNWzIrQL7YyD3wcQQOCSRlB9GoveiM7KVdRcTq668doPs5aKt9ABjny1id9E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR01MB3958 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, TXREP, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2020 18:20:30 -0000 Erick, I assume that this needs to be done on all the functions since you mention "cfun". Gary ________________________________ From: Erick Ochoa Sent: Monday, September 14, 2020 12:10 AM To: Gary Oblock ; gcc@gcc.gnu.org Subject: Re: Dominance information problem [EXTERNAL EMAIL NOTICE: This email originated from an external sender. Plea= se be mindful of safe email handling and proprietary information protection= practices.] Hi Gary, I'm not 100% sure this will fix the problem, but in the past I have had to call the following function: /* If dominator info is not available, we need to calculate it. */ if (!dom_info_available_p (CDI_DOMINATORS)) calculate_dominance_info (CDI_DOMINATORS); Basically dominance information was not available for cfun. Also, you might also need to call: if (dom_info_available_p (CDI_DOMINATORS)) free_dominance_info (CDI_DOMINATORS); Just before your pass is done. These were some calls I needed to make in a different pass when I was working with dominators. On 12/09/2020 09:26, Gary Oblock wrote: > I'm trying to do performance qualification for my structure > reorganization optimization. > > I'm doing pretty straightforward stuff and I haven't at this point in > time (qualifying the optimization,) modified the program. So I'm a > little surprised this is failing. Here is the code that's failing on > the first iteration of the for loops: > > struct cgraph_node *node; > FOR_EACH_FUNCTION_WITH_GIMPLE_BODY ( node) { > struct function *func =3D DECL_STRUCT_FUNCTION ( node->decl); > push_cfun ( func); > > class loop *loop; > FOR_EACH_LOOP_FN ( func, loop, LI_ONLY_INNERMOST ) > { > size_t num_bbs =3D loop->num_nodes; > basic_block *bbs =3D get_loop_body ( loop); // FAILS HERE!!! > : > stuff never reached > > How it's failing (in code from dominance.c) I'm guessing tells me the > dominance information is messed up (unlikely) or needs to be > recomputed. If I'm not wrong, how do I go about doing the later???? > > /* Return TRUE in case BB1 is dominated by BB2. */ > bool > dominated_by_p (enum cdi_direction dir, const_basic_block bb1, const_basi= c_block bb2) > { > unsigned int dir_index =3D dom_convert_dir_to_idx (dir); > struct et_node *n1 =3D bb1->dom[dir_index], *n2 =3D bb2->dom[dir_index= ]; > > gcc_checking_assert (dom_computed[dir_index]); // <=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D BOOM! > > if (dom_computed[dir_index] =3D=3D DOM_OK) > return (n1->dfs_num_in >=3D n2->dfs_num_in > && n1->dfs_num_out <=3D n2->dfs_num_out); > > return et_below (n1, n2); > } > > > Thanks, > > Gary Oblock > > > > > > > CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, i= s for the sole use of the intended recipient(s) and contains information th= at is confidential and proprietary to Ampere Computing or its subsidiaries.= It is to be used solely for the purpose of furthering the parties' busines= s relationship. Any unauthorized review, copying, or distribution of this e= mail (or any attachments thereto) is strictly prohibited. If you are not th= e intended recipient, please contact the sender immediately and permanently= delete the original and any copies of this email and any attachments there= to. >