From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65235 invoked by alias); 30 Aug 2019 08:02:12 -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 65217 invoked by uid 89); 30 Aug 2019 08:02:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: NAM02-BL2-obe.outbound.protection.outlook.com Received: from mail-eopbgr750107.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) (40.107.75.107) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2019 08:02:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lAS66dY1ZFCi5UGNeS4SD05sMPxtaTs+SDGPcY2Pz/Ofm41aN/APkF84+dK7Vi+7WNnGbEeKR/PcjEJANEIAghKnrplH04p/AchasBGh72C7FZVAxehVUXcP+xGqSG9fQ5nbvHYCqVgWMpckv/EBlvbUB0eUx8UE9JIpwh2K05q4fB4EldlJixJYDRz5QaNxrDUrx72BR3J/frOUwFcfSTSQ99n6VWqIJSmq63CSzKVGSwi4mpKvZdqLdUpVLzGI5QKCoTa61V9i2C6z7xMENxeQ/81+HUIHzs261WbHaMkTpJgjyqO+IuoWZvKcydFv3NLpCRP+WkA8gpxamqxikg== 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=2BN6rObUgu7mwl08KZFZ+uKD9v8hskPIaFwHQg+bG7E=; b=VbcW7d+fNZ6bkCv86kYtVyOjKQaZ0yOKf/UUAw6YWSy3Q+4iQPAR1Nv5SVARIQnRCbVxGLagThDUaL5kC0TfqXyeL/Lgmy1iT4ebZIgk/O1ndtarXRp8cw0drS4hxmQyNNMH0JKGglNavkUYZllWM4qulxKwjXAhkte8/kDgz2UHxajhBLlOtr166sX5WyYhndHSZFdqV8B4sKBzWSHKVoQfLPo2ScTCZZ0rQBzpBxa2hzcUvnncx+mxebZU9Hj35XtgrPpcWfhaH/GB7Qbuo7N+ImungrLc20ohyoDB21o5oHhZTo1dWsmKqYvoCrH4noDX2IOB5yLql8xpYK0Ojg== 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=2BN6rObUgu7mwl08KZFZ+uKD9v8hskPIaFwHQg+bG7E=; b=nDLdPCW5u9lemWrQy8kKOdwMX+xF4KDX0zBAZfC/cbOpBNwXEp7o+6sUHq5v/s/md8IKgGvp2aDu8rbKjMoHR9HnYypkdZoELzIYxoa4RJK8jAKaX84DcYN692bphn9P6GnEEru1BPNOG6zSOTMc+FHKOFcER10KgqljT6CqsTg= Received: from BYAPR01MB4869.prod.exchangelabs.com (20.177.228.18) by BYAPR01MB4038.prod.exchangelabs.com (52.135.236.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.21; Fri, 30 Aug 2019 08:02:07 +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:02:07 +0000 From: Feng Xue OS To: Martin Jambor , "gcc-patches@gcc.gnu.org" , Jan Hubicka Subject: Re: [PATCH] Setup predicate for switch default case in IPA (PR ipa/91089) Date: Fri, 30 Aug 2019 08:32: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="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ia885DSZbtiRf6ZmQnJoPgYluz9k45D+Hqt1f8UnrFr6NtsSLmBXd81245nhze9EwEw7pgkZF6e0tu2zrxIwM55aoXjTgtoC6GvoLoEfvnY= X-SW-Source: 2019-08/txt/msg02040.txt.bz2 That's good. Thanks for your comments. Feng ________________________________________ From: Martin Jambor Sent: Thursday, August 29, 2019 11:00 PM To: Feng Xue OS; gcc-patches@gcc.gnu.org; Jan Hubicka Subject: Re: [PATCH] Setup predicate for switch default case in IPA (PR ipa= /91089) Hi, On Fri, Jul 12 2019, Feng Xue OS wrote: > IPA does not construct executability predicate for default case of switch= statement. > So execution cost of default case is not properly evaluated in IPA-cp, th= is might > prevent function clone for function containing switch statement, if certa= in non-default > case is proved to be executed after constant propagation. > > This patch is composed to deduce predicate for default case, if it turns = out to be a > relative simple one, for example, we can try to merge case range, and use > comparison upon range bounds, and also range analysis information to simp= lify > predicate. > I have read through the patch and it looks OK to me but I cannot approve it, you have to ping Honza for that. Since you decided to use the value range info, it would be nice if you could also add a testcase where it plays a role. Also, please don't post changelog entries as a part of the patch, it basically guarantees it will not apply for anybody, not even for you when you update your trunk. Thanks for working on this, Martin > Feng > > ---- > diff --git a/gcc/ChangeLog b/gcc/ChangeLog > index 3d92250b520..4de2f568990 100644 > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,10 @@ > +2019-07-12 Feng Xue > + > + PR ipa/91089 > + * ipa-fnsummary.c (set_switch_stmt_execution_predicate): Add predic= ate > + for switch default case using range analysis information. > + * params.def (PARAM_IPA_MAX_SWITCH_PREDICATE_BOUNDS): New. > + > 2019-07-11 Sunil K Pandey >