From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128672 invoked by alias); 30 Aug 2019 08:29:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 128663 invoked by uid 89); 30 Aug 2019 08:29:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: NAM05-DM3-obe.outbound.protection.outlook.com Received: from mail-eopbgr730116.outbound.protection.outlook.com (HELO NAM05-DM3-obe.outbound.protection.outlook.com) (40.107.73.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2019 08:29:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KVkF8KordRCWZ8Hl/8kKUAY0TYeY6cYCr2k0mQc7TYCVQ+i8hgrLQBZf2J1vQtbKFh66NxW0g9Ar46gqaVjBYDnmyzkwj0Sp2vsBTAuEoOPdLlJA4zp6hbqMytTSL1o+44CxZ6F6Fg6GT5luLc2NjY+w6hSydCHI7BkIerNCtbPF5u5EKWBmXyvtFwNnCa5/okgLrfH2+BLVxRtaam6VYyvqnwB4fQB3W0UEc59WkF6Ecia867cwhqdVBGxTJsJfXGcOlhgZ4+kobfolTXCJ2uACTMxCxlflFTkbVaM1bVoRekkfOIdoh5j4yVEcQGC8yoZ6NbEb+WVPgwweuGs6CA== 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=FFohF7F0av8t3YFATzCkRrxgF/HGCzb/oXih4nOmAWA=; b=Ni8gpZmD9f4WmVyLts9FLStc4vXizYux+7D2GfNWlJHbMtChkEY0fcxIwnHAc4fEwwuc0+t3J8M2l5HXZtt4tm5cGwV/MZM0ps7EdlpC1yBlwxV0Pcs2QhlOIDlrBJvfuJ1qk7IRvdURx1B6xWwd5DsZHz+o/GzNGfC283YjMov4F096/3hBPxA+M5tzveNyWIXABdWtzJnJfpv3ZEsY7KPDGujlgYHL7eUmsFl/dooGBrRHMq4R/bvL0xkac8dZ1VAKlru0a+YpGTkpH0/VtUuxsnl8YNjdB3vPtO7GVKPP1jDR6w4a3z4c/XPMm0b9YA7+FDAWrqd0RMa78U7pLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FFohF7F0av8t3YFATzCkRrxgF/HGCzb/oXih4nOmAWA=; b=ImAMOzfdXv/C/4n5IyZZxejoAw8NW4wELVcNnk+P6iEUYcQlPIqSqQRvjZT0TGqvx7iNW4XJ2xL1wzyUHs8pCzgzom34dgVnByU8V04whqJipxKW63WbGfeT7vYJvcLgjaPOu+TSry0FjH23eJRx05iVvXLpUnEw2+S8QbKBxgE= Received: from BYAPR01MB4869.prod.exchangelabs.com (20.177.228.18) by BYAPR01MB5256.prod.exchangelabs.com (20.177.224.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.18; Fri, 30 Aug 2019 08:29:18 +0000 Received: from BYAPR01MB4869.prod.exchangelabs.com ([fe80::60eb:f69d:f5b6:cc27]) by BYAPR01MB4869.prod.exchangelabs.com ([fe80::60eb:f69d:f5b6:cc27%2]) with mapi id 15.20.2199.021; Fri, 30 Aug 2019 08:29:18 +0000 From: Feng Xue OS To: Martin Jambor , "gcc-patches@gcc.gnu.org" , Jan Hubicka Subject: Re: [PATCH] Generalized predicate/condition for parameter reference in IPA (PR ipa/91088) Date: Fri, 30 Aug 2019 08:42:00 -0000 Message-ID: References: , In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=fxue@os.amperecomputing.com; x-ms-oob-tlc-oobclassifiers: OLM:10000; received-spf: None (protection.outlook.com: os.amperecomputing.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Mhn5qDnrggZpZXYSs4z6f+JDK5otH6pbskxWOykzKcgU6UZXk6uXcj9YlkPpAh691d+2q6vF8gKAyzH31oPFcIFGmCpiF9tTnMFhwN/pL/w= X-SW-Source: 2019-08/txt/msg02043.txt.bz2 > (It's a bad idea to make ChangeLog entries part of the patch, it won't > apply to anyone, not even to you nowadays. ) Got it. Will not include this kind of info in later patches. > I understand describing these things is difficult, but flatten is > strange way to describe what the function does. What about somthing > like the following? >=20 > Analyze EXPR if it represents a series of simple operations performed on > a function parameter and return true if so. FBI, STMT, INDEX_P, SIZE_P > and AGGPOS have the same meaning like in > unmodified_parm_or_parm_agg_item. Operations on the parameter are > recorded to PARAM_OPS_P if it is not NULL. Operations should be recorded in some place, and this is why PARAM_OPS_P is used. Not quite understand this point. >> + /* Find use of parameter, add a convert operation to describe >> + result type, which may not be same as parameter type. */ >> + eval_op.val_is_rhs =3D false; >> + eval_op.val =3D NULL_TREE; >> + eval_op.code =3D VIEW_CONVERT_EXPR; >> + eval_op.type =3D TREE_TYPE (expr); >> + >> + vec_safe_insert (*param_ops_p, 0, eval_op); > If we get here in the first iteration of the loop, could we not insert > anything into the vector and handle such cases in > evaluate_conditions_for_known_args like we do today (well, with > fold_convert might be better)? It could save quite some memory and it > is important to try keep the memory footprint down in IPA summaries. Here is a little trick to make code of folding in evaluate_conditions_for_k= nown_args () be simple. It does consume some memory for most cases. Will consider other = way and remove this. > Also, I think you want a parameter to limit the maximum length of > param_ops_p, at some point someone will come with some crazy > machine-generated code that will create huge vectors. Yes. Exactly. Thanks, Martin