Message ID | patch-18267-tamar@arm.com |
---|---|
State | Not Applicable |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1199371dyb; Wed, 14 Feb 2024 05:10:27 -0800 (PST) X-Forwarded-Encrypted: i=5; AJvYcCWAzQEtir/+4/85FXaeIbZD8zIOqzxvg0UGCB3xyYwdTATsSYooBdbUIAg5uSg/UoTKZcw0Y8GjWL5gQqynRv+IVhAnWg== X-Google-Smtp-Source: AGHT+IH+9s0wXyn1eGuoy/xmDAnbjF/OZy2uo+eydB19+OGnMwi0ggRSvl30NA8AaYcHgafSg2oS X-Received: by 2002:a37:c44d:0:b0:783:f753:813a with SMTP id h13-20020a37c44d000000b00783f753813amr2773496qkm.54.1707916227479; Wed, 14 Feb 2024 05:10:27 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1707916227; cv=pass; d=google.com; s=arc-20160816; b=U/prlHetcS9fP5bELMRUAvet54sub1/n26e3R7cal6Ax0MK1EjnUF8b8+cWyOaMrpX 21mXD1qbXYeP/jd53VlHBrg6ZSSGv5Wrp+W2tvuXD4DORmkdCUOmX/F2hFCRCFKJVAOP E6AXg7QDcs4Srw5ZY5Kmj+Fp8oDpku15i6ypauGVsj2S+z0ZfHKSXVbowwVH4dLZmn8f Q4jHJht+HGvyoc1uh98KLYx2TxtRlEYthCtG78cTi5mfY/IQRy41nH606+9EcBURj1e/ WyE1ICYU9kGjKoiDWWCp6ESyU3r5K4ZCUwzQGMdt8Yji0J4YCUorPZuWd0nWEd2IZizX WdsA== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:content-disposition:message-id:subject:cc :to:from:date:authentication-results-original:dkim-signature :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=E8tecnc50Ixo58DozT8RiKQ40MbNo9a0dcvp5GNFG3s=; fh=KdsHQ9KEWmy3WIGDp1LADF1k9CpBdthjPHWV4Y3ZDrw=; b=06Tdh8XyrI+KkejHiiY5aTO32zU5q4i/j+qB83TdEah/8HW+XXsJeEf8fp/hw3qayH 8/EC5DOQwhQFByLmAGycmEY2MmU1MrV/s0mRrdl/QhJIVsl3FX/pc9VCOAfTqoCKLZ2U NMXVbPznTGSmrauR8y1SY0UEKdP5diKuX68ZavVVphLIu+h9MC9EkvPowDUOcSa4zvxT SsZRLf441czzW74ge6UegGnvfry/G6Id5uTktO6tqMTTdlKnQw8/Xi2MjQxS4RDe7wze /6BOyVar2x02NaZD5rBmA7D6WhdpVqk7hom7u4WgmNnDXg4p0nyY6RA2xa6GPGESjkBK jZuQ==; dara=google.com ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="3O/RsKQ5"; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="3O/RsKQ5"; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=4; AJvYcCUDSeZEsggTci1ahJ1qgI5PIQR5NZiEZfeQoLLjl+gY7IhDrm/AIfLqHIGxOtwMZtGSwHCxkqcH6/7cSpky0jgG6wIRsg== Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id bl4-20020a05620a1a8400b00787214b3415si3545038qkb.753.2024.02.14.05.10.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 05:10:27 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="3O/RsKQ5"; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="3O/RsKQ5"; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2ED14385DC30 for <ouuuleilei@gmail.com>; Wed, 14 Feb 2024 13:10:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2054.outbound.protection.outlook.com [40.107.8.54]) by sourceware.org (Postfix) with ESMTPS id C76893857011 for <gcc-patches@gcc.gnu.org>; Wed, 14 Feb 2024 13:09:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C76893857011 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C76893857011 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.54 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1707916186; cv=pass; b=kuJyG+uzwSRBGW9damIhha3wHNyk5d0rASPmTBjW1qdxiYKqf7RaWc6VbM63FtZexW+nulujfD8lNhQOn0BzJoH+EnGcknneamH9Uq1NOv3sk7nYNwnGgKeRcF6YwqIvCN7kxq6mNchT+NwAGdrDwTxq3piEfdS3rhzHhMcHjac= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1707916186; c=relaxed/simple; bh=/HVdzPe6fs95eR6WTglfYqrjaR/NtvSiFR21hqmtpbA=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=HsrfIQ5/qWLIFknidFlFuO/X3fUFGnEWxw4wK3GEKUn4yhVmVdOd82poVlyqPfyPonQAmWRgf3j/57g6SkAhZeEgM+YV0eUo29+rrd1vf5XXk8ftTZs2jXMEJbvao5B65tYdeaKXT1kifsmhZoPMDx8rx0v2q6L/zh7TA1NgEdU= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=hA28X1ZQ15YBhWc5/BVQUf6XMLZswOuQaiode53u1pr10RzPdblO2J7StW4yk89ZoZrooLwmeCqGEz6cfkMAosAHhPHLVsZdcNlc9msPWTGSfP7JExQaRPmac6tjRLMjzvSXFL/SJq9fpzaJrOIpnIaEgFIpmXC4UaOvHxWDIZcksfWsKWZfgxQ6seDv9ZRYeTsnmUk8arO1oIKrgyrc2K53L8Qm1g2rdNmeRkWiN4bFBWpY1iyBn3K6rgmzTbaNPvoGpLbzDNd68mKvQ2CxvTKFHYCyDDrhfOMhkwm9R6S8/4vAVRtqNZOZNR8iTxCGhh6LfI4AhD5LjAE7kxNKXg== ARC-Message-Signature: i=2; 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=E8tecnc50Ixo58DozT8RiKQ40MbNo9a0dcvp5GNFG3s=; b=iw9Ek+PmdmPjQF2KwW7SvQZ/yiKBQGVGGFJPRPIkyUgdRFaz0L6Ct9MMCo8xpEPGX8gR6dECXkcQ9QzNFmEJA2frwwvzUZwpPV9UarGLiXM2HqW4vIVETSDoSpLBVfhPZ6ICkdoGDjeMu3J5ZA5V08xpH1cIHTbVBlBCbf679fExy4jB2ldGC4FxRdFGok1w00ysIfdCIxDbAu9MO2qH9xWb93g4vij5N8d2MNyUGRL1X5WlrRWxqwam1A2j7xEnj9QZHixRBsB6Cz1qBNYl2Sz2GO9cpCrPR56jBRG8qhjheuURBodEiPlZJLmiQoa9SSLBV+OCdP9OKHCpPYpmLw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E8tecnc50Ixo58DozT8RiKQ40MbNo9a0dcvp5GNFG3s=; b=3O/RsKQ5ongsgXLh+VweV3x42wJMyva9gzWz7xtqH56u3swujwnoECgLxkB1m7knOX0aMyE1omuCHxrQ1mjTgWNzaNBz1aFPTVAAT6kv2s+lQNYDOPVWxOy432soJUAUk0j/+FWzqHSE4BW+hYgyc2SceCAHZvQE2Mcc5fMVlOo= Received: from DB9PR05CA0024.eurprd05.prod.outlook.com (2603:10a6:10:1da::29) by DB9PR08MB8411.eurprd08.prod.outlook.com (2603:10a6:10:3d5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.39; Wed, 14 Feb 2024 13:09:42 +0000 Received: from DU2PEPF00028D13.eurprd03.prod.outlook.com (2603:10a6:10:1da:cafe::d1) by DB9PR05CA0024.outlook.office365.com (2603:10a6:10:1da::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.39 via Frontend Transport; Wed, 14 Feb 2024 13:09:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF00028D13.mail.protection.outlook.com (10.167.242.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Wed, 14 Feb 2024 13:09:41 +0000 Received: ("Tessian outbound a6e56d06a0e4:v228"); Wed, 14 Feb 2024 13:09:41 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d3d6656abd697657 X-CR-MTA-TID: 64aa7808 Received: from 8d6926780995.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 132500BD-7D00-487D-A251-E35DB15D6734.1; Wed, 14 Feb 2024 13:09:34 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8d6926780995.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 14 Feb 2024 13:09:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M2e1umLgFNyA+XKx88daL09zWe5AYriFugWGOGYbJzvJXVretVjk0BhVBgAcPbdN9ujFsyl4bXR+rxDHbBTOqCVUhxRu1z/xb9T/JODbKJgyY7gxs4S3lqfvFAbZhaVheWcaF6rm+3kQGJhPAEUrTHviIIBtrVXEOmNidKhA7Au8TkN+bY9CvRjmJquYjtgRPEKGk6GPXowuKEcEloFkoXuIhHIUcH4UPP8gG/lTWC9tnjqGN1DZcC8iAoY07VmUqv96cfcMkDNEtbXZclc0x+GKWmLrRiu0sABtiV9+RPsztvsXhtF9Mk5BOY8/ddGudmkcPHjARBzDb4ssKVaBsQ== 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=E8tecnc50Ixo58DozT8RiKQ40MbNo9a0dcvp5GNFG3s=; b=fT4xxqoTz4Bc7Nnwxpe7nv36gIxVcKRXcsNxfdC53gQ9X4WrY/nkXPrxngy4GMYRelGeVi+QZdNKa5m5C27MwNBTE3Obg6G4VU/pIte+m83wtUicoQ2ymrdg0To/Gf/tnrX3CH3smMhmTYlPNExG6jNhOlhxCbS7j/IkFys+BTcdmXHxJlXK9VCJ2j1v14fhrC5RPuFEIB3XK7PEWRClHqExszXjsR2vcmBEx8/UelmaFbkFP8EIH/ENbWX2iA6WndmZZyXdWoLdUqNGqZF93rUbO2Ip88TjdC+PQS/7rpk/uZtyEg7F8LEOX+byeOtY2kLTXzH9+GtfWbQpWtckQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E8tecnc50Ixo58DozT8RiKQ40MbNo9a0dcvp5GNFG3s=; b=3O/RsKQ5ongsgXLh+VweV3x42wJMyva9gzWz7xtqH56u3swujwnoECgLxkB1m7knOX0aMyE1omuCHxrQ1mjTgWNzaNBz1aFPTVAAT6kv2s+lQNYDOPVWxOy432soJUAUk0j/+FWzqHSE4BW+hYgyc2SceCAHZvQE2Mcc5fMVlOo= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by AS8PR08MB6584.eurprd08.prod.outlook.com (2603:10a6:20b:33c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.26; Wed, 14 Feb 2024 13:09:32 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::810c:8495:3f0a:ef8]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::810c:8495:3f0a:ef8%7]) with mapi id 15.20.7292.026; Wed, 14 Feb 2024 13:09:32 +0000 Date: Wed, 14 Feb 2024 13:09:28 +0000 From: Tamar Christina <tamar.christina@arm.com> To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com Subject: [PATCH]middle-end: inspect all exits for additional annotations for loop. Message-ID: <patch-18267-tamar@arm.com> Content-Type: multipart/mixed; boundary="pocqtW5SiZUXk+Uu" Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|AS8PR08MB6584:EE_|DU2PEPF00028D13:EE_|DB9PR08MB8411:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d95b904-2c99-452b-40d7-08dc2d5e34f5 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: plH7GbBEQereuuiZdPLm/pYH3869hjrJ7Sd6Q0OlPgL3Eg7pcx90oyqIa7hXyIjXV+zvWYqvr3Cj7S7GpVMRAn/Tn1aKdUSc65g8AhC87Jy86AMgWFf12E9HRzpSsDQKNQHAeOJNyoyptGqtcFbZg5IiaNQzCIXbw3oJsXOMkEmg7tzBhcNgrMI4SvNPXllpsxIW4vdx1sxes4WkJHU4UBgebslDQAEUT3Lv+6VmD4jlkihICZ7t/k5d/BYoql6r/FW+yKdCOtapBMahXZe2x2YUsHxml1SBkrJL9MN7UXXpsy/bnVqoLAtR16SLej/de1oo5q4DA+MgeiQm3/k8OyDnJeGs3So06HYsYAwTUDvZYY06QAziwiWnQBw8u8nQdm0Q8ZO8NlweA/25OPOoJTRxCI6HejhRWqMkN6ymO1eDTPXX95iTbAdyfmdye8srdvqYceZN8G283nBi2PpJBSi0BE3yjoA3RIEpBS9joX7eGInA5JP8G2+Cm0hlsCusmEHnrVRq1Z7Aj3Hz3qW+OGN9xQhrf2baoBPQd+yBLko= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(376002)(366004)(39860400002)(136003)(346002)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(84970400001)(6512007)(6486002)(478600001)(41300700001)(6666004)(2906002)(8676002)(8936002)(44832011)(235185007)(4326008)(5660300002)(33964004)(6506007)(44144004)(316002)(66946007)(66476007)(66556008)(6916009)(2616005)(83380400001)(4743002)(86362001)(38100700002)(36756003)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6584 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D13.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8c36ac54-b43f-447d-4c4a-08dc2d5e2f35 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YjAtEv9Pz3IUfq3CBL3FMBt/+cWbwaZ3nb1rqTCbuVSKRsMfcal9vKidwxhs4e/OsCWwFGfOD0AvqVxMSHCFpuHX0o0yu5hU+yYTWYaOgU+x23gWfM5mESvLlEhEC5elol6nyTCzcZDAdb0PLIl/SJrHEYuR0ML5iOvrmFJzlRzJdssLEqVbknmPFy8oTBxzvERuXMaAHPQeLSHubz8nwT53QBkHqm9eNAfV5hqNER8k8Caa+pGPAAajcViMd0+qC1GO3hmnTvm/h5f2T2eSRAjJMWDn6iD69DtcgAV770SDDPgB7mixk/z7XX/WRI2vgFuT2ykzN60PWn06zcQ1H4e+hwCTjddXJoF321eKbWoEzqkq7VJST4nLRHKm2mKn2uGeNp6+I+wXCxJCwqBDoz1Mwx3TmEJsTc//4K6P88ThKYhq5Fa5rbUBDvWpSPXYgnz7ZQldbZSkOLLTU1o/OtGhJo4qyp2+EBJPpwhd5Hv1iMuz3cYonZB56pCxPOLcSff059YcHY/Iqc6B4VmcXBN3qEJtLn2Nns/lcb7jfTBmok6qIz9ZpWwV9t9UlybBVPUkEc2VAugFp3W7X/zW3w== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(136003)(376002)(346002)(230922051799003)(451199024)(186009)(1800799012)(82310400011)(64100799003)(46966006)(40470700004)(36840700001)(84970400001)(8936002)(4326008)(26005)(8676002)(36756003)(356005)(41300700001)(86362001)(83380400001)(81166007)(336012)(2906002)(4743002)(44832011)(5660300002)(316002)(70586007)(2616005)(6512007)(70206006)(107886003)(6486002)(478600001)(235185007)(82740400003)(6916009)(6506007)(44144004)(33964004)(6666004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2024 13:09:41.8431 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d95b904-2c99-452b-40d7-08dc2d5e34f5 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D13.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8411 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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.30 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> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790879965896065978 X-GMAIL-MSGID: 1790879965896065978 |
Series |
middle-end: inspect all exits for additional annotations for loop.
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | fail | Git am fail log |
Commit Message
Tamar Christina
Feb. 14, 2024, 1:09 p.m. UTC
Hi All, Attaching a pragma to a loop which has a complex condition often gets the pragma dropped. e.g. #pragma GCC novector while (i < N && parse_tables_n--) before lowering this is represented as: if (ANNOTATE_EXPR <i <= 305 && parse_tables_n-- != 0, no-vector>) ... But after lowering the condition is broken appart and attached to the final component of the expression: if (parse_tables_n.2_2 != 0) goto <D.4456>; else goto <D.4453>; <D.4456>: iftmp.1D.4452 = 1; goto <D.4454>; <D.4453>: iftmp.1D.4452 = 0; <D.4454>: D.4451 = .ANNOTATE (iftmp.1D.4452, 2, 0); if (D.4451 != 0) goto <D.4442>; else goto <D.4440>; <D.4440>: and it's never heard from again because during replace_loop_annotate we only inspect the loop header and latch for annotations. Since annotations were supposed to apply to the loop as a whole this fixes it by also checking the loop exit src blocks for annotations. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * tree-cfg.cc (replace_loop_annotate): Inspect loop edges for annotations. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-novect_gcond.c: New test. --- inline copy of patch -- diff --git a/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c new file mode 100644 index 0000000000000000000000000000000000000000..01e69cbef9d51b234c08a400c78dc078d53252f1 -- diff --git a/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c new file mode 100644 index 0000000000000000000000000000000000000000..01e69cbef9d51b234c08a400c78dc078d53252f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c @@ -0,0 +1,39 @@ +/* { dg-add-options vect_early_break } */ +/* { dg-require-effective-target vect_early_break_hw } */ +/* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-O3" } */ + +/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */ + +#include "tree-vect.h" + +#define N 306 +#define NEEDLE 136 + +int table[N]; + +__attribute__ ((noipa)) +int foo (int i, unsigned short parse_tables_n) +{ + parse_tables_n >>= 9; + parse_tables_n += 11; +#pragma GCC novector + while (i < N && parse_tables_n--) + table[i++] = 0; + + return table[NEEDLE]; +} + +int main () +{ + check_vect (); + +#pragma GCC novector + for (int j = 0; j < N; j++) + table[j] = -1; + + if (foo (0, 0xFFFF) != 0) + __builtin_abort (); + + return 0; +} diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index cdd439fe7506e7bc33654ffa027b493f23d278ac..a29681bffb902d2d05e3f18764ab519aacb3c5bc 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -327,6 +327,10 @@ replace_loop_annotate (void) if (loop->latch) replace_loop_annotate_in_block (loop->latch, loop); + /* Then also check all other exits. */ + for (auto e : get_loop_exit_edges (loop)) + replace_loop_annotate_in_block (e->src, loop); + /* Push the global flag_finite_loops state down to individual loops. */ loop->finite_p = flag_finite_loops; }
Comments
On Wed, 14 Feb 2024, Tamar Christina wrote: > Hi All, > > Attaching a pragma to a loop which has a complex condition often gets the pragma > dropped. e.g. > > #pragma GCC novector > while (i < N && parse_tables_n--) > > before lowering this is represented as: > > if (ANNOTATE_EXPR <i <= 305 && parse_tables_n-- != 0, no-vector>) ... > > But after lowering the condition is broken appart and attached to the final > component of the expression: > > if (parse_tables_n.2_2 != 0) goto <D.4456>; else goto <D.4453>; > <D.4456>: > iftmp.1D.4452 = 1; > goto <D.4454>; > <D.4453>: > iftmp.1D.4452 = 0; > <D.4454>: > D.4451 = .ANNOTATE (iftmp.1D.4452, 2, 0); > if (D.4451 != 0) goto <D.4442>; else goto <D.4440>; > <D.4440>: > > and it's never heard from again because during replace_loop_annotate we only > inspect the loop header and latch for annotations. > > Since annotations were supposed to apply to the loop as a whole this fixes it > by also checking the loop exit src blocks for annotations. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? I think this isn't entirely good. For simple cases for do {} while the condition ends up in the latch while for while () {} loops it ends up in the header. In your case the latch isn't empty so it doesn't end up with the conditional. I think your patch is OK to the point of looking at all loop exit sources but you should elide the special-casing of header and latch since it's really only exit conditionals that matter. Richard. > Thanks, > Tamar > > gcc/ChangeLog: > > * tree-cfg.cc (replace_loop_annotate): Inspect loop edges for annotations. > > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/vect-novect_gcond.c: New test. > > --- inline copy of patch -- > diff --git a/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c > new file mode 100644 > index 0000000000000000000000000000000000000000..01e69cbef9d51b234c08a400c78dc078d53252f1 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c > @@ -0,0 +1,39 @@ > +/* { dg-add-options vect_early_break } */ > +/* { dg-require-effective-target vect_early_break_hw } */ > +/* { dg-require-effective-target vect_int } */ > +/* { dg-additional-options "-O3" } */ > + > +/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */ > + > +#include "tree-vect.h" > + > +#define N 306 > +#define NEEDLE 136 > + > +int table[N]; > + > +__attribute__ ((noipa)) > +int foo (int i, unsigned short parse_tables_n) > +{ > + parse_tables_n >>= 9; > + parse_tables_n += 11; > +#pragma GCC novector > + while (i < N && parse_tables_n--) > + table[i++] = 0; > + > + return table[NEEDLE]; > +} > + > +int main () > +{ > + check_vect (); > + > +#pragma GCC novector > + for (int j = 0; j < N; j++) > + table[j] = -1; > + > + if (foo (0, 0xFFFF) != 0) > + __builtin_abort (); > + > + return 0; > +} > diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc > index cdd439fe7506e7bc33654ffa027b493f23d278ac..a29681bffb902d2d05e3f18764ab519aacb3c5bc 100644 > --- a/gcc/tree-cfg.cc > +++ b/gcc/tree-cfg.cc > @@ -327,6 +327,10 @@ replace_loop_annotate (void) > if (loop->latch) > replace_loop_annotate_in_block (loop->latch, loop); > > + /* Then also check all other exits. */ > + for (auto e : get_loop_exit_edges (loop)) > + replace_loop_annotate_in_block (e->src, loop); > + > /* Push the global flag_finite_loops state down to individual loops. */ > loop->finite_p = flag_finite_loops; > } > > > > >
> > I think this isn't entirely good. For simple cases for > do {} while the condition ends up in the latch while for while () {} > loops it ends up in the header. In your case the latch isn't empty > so it doesn't end up with the conditional. > > I think your patch is OK to the point of looking at all loop exit > sources but you should elide the special-casing of header and > latch since it's really only exit conditionals that matter. > That makes sense, since in both cases the edges are in the respective blocks. Should have thought about it more. So how about this one. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * tree-cfg.cc (replace_loop_annotate): Inspect loop edges for annotations. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-novect_gcond.c: New test. --- inline copy of patch --- diff --git a/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c new file mode 100644 index 0000000000000000000000000000000000000000..01e69cbef9d51b234c08a400c78dc078d53252f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c @@ -0,0 +1,39 @@ +/* { dg-add-options vect_early_break } */ +/* { dg-require-effective-target vect_early_break_hw } */ +/* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-O3" } */ + +/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */ + +#include "tree-vect.h" + +#define N 306 +#define NEEDLE 136 + +int table[N]; + +__attribute__ ((noipa)) +int foo (int i, unsigned short parse_tables_n) +{ + parse_tables_n >>= 9; + parse_tables_n += 11; +#pragma GCC novector + while (i < N && parse_tables_n--) + table[i++] = 0; + + return table[NEEDLE]; +} + +int main () +{ + check_vect (); + +#pragma GCC novector + for (int j = 0; j < N; j++) + table[j] = -1; + + if (foo (0, 0xFFFF) != 0) + __builtin_abort (); + + return 0; +} diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index cdd439fe7506e7bc33654ffa027b493f23d278ac..bdffc3b4ed277724e81b7dd67fe7966e8ece0c13 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -320,12 +320,9 @@ replace_loop_annotate (void) for (auto loop : loops_list (cfun, 0)) { - /* First look into the header. */ - replace_loop_annotate_in_block (loop->header, loop); - - /* Then look into the latch, if any. */ - if (loop->latch) - replace_loop_annotate_in_block (loop->latch, loop); + /* Check all exit source blocks for annotations. */ + for (auto e : get_loop_exit_edges (loop)) + replace_loop_annotate_in_block (e->src, loop); /* Push the global flag_finite_loops state down to individual loops. */ loop->finite_p = flag_finite_loops;
> Am 14.02.2024 um 16:16 schrieb Tamar Christina <tamar.christina@arm.com>: > > >> >> >> I think this isn't entirely good. For simple cases for >> do {} while the condition ends up in the latch while for while () {} >> loops it ends up in the header. In your case the latch isn't empty >> so it doesn't end up with the conditional. >> >> I think your patch is OK to the point of looking at all loop exit >> sources but you should elide the special-casing of header and >> latch since it's really only exit conditionals that matter. >> > > That makes sense, since in both cases the edges are in the respective > blocks. Should have thought about it more. > > So how about this one. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? Ok Richard > Thanks, > Tamar > > gcc/ChangeLog: > > * tree-cfg.cc (replace_loop_annotate): Inspect loop edges for annotations. > > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/vect-novect_gcond.c: New test. > > --- inline copy of patch --- > > diff --git a/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c > new file mode 100644 > index 0000000000000000000000000000000000000000..01e69cbef9d51b234c08a400c78dc078d53252f1 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c > @@ -0,0 +1,39 @@ > +/* { dg-add-options vect_early_break } */ > +/* { dg-require-effective-target vect_early_break_hw } */ > +/* { dg-require-effective-target vect_int } */ > +/* { dg-additional-options "-O3" } */ > + > +/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */ > + > +#include "tree-vect.h" > + > +#define N 306 > +#define NEEDLE 136 > + > +int table[N]; > + > +__attribute__ ((noipa)) > +int foo (int i, unsigned short parse_tables_n) > +{ > + parse_tables_n >>= 9; > + parse_tables_n += 11; > +#pragma GCC novector > + while (i < N && parse_tables_n--) > + table[i++] = 0; > + > + return table[NEEDLE]; > +} > + > +int main () > +{ > + check_vect (); > + > +#pragma GCC novector > + for (int j = 0; j < N; j++) > + table[j] = -1; > + > + if (foo (0, 0xFFFF) != 0) > + __builtin_abort (); > + > + return 0; > +} > diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc > index cdd439fe7506e7bc33654ffa027b493f23d278ac..bdffc3b4ed277724e81b7dd67fe7966e8ece0c13 100644 > --- a/gcc/tree-cfg.cc > +++ b/gcc/tree-cfg.cc > @@ -320,12 +320,9 @@ replace_loop_annotate (void) > > for (auto loop : loops_list (cfun, 0)) > { > - /* First look into the header. */ > - replace_loop_annotate_in_block (loop->header, loop); > - > - /* Then look into the latch, if any. */ > - if (loop->latch) > - replace_loop_annotate_in_block (loop->latch, loop); > + /* Check all exit source blocks for annotations. */ > + for (auto e : get_loop_exit_edges (loop)) > + replace_loop_annotate_in_block (e->src, loop); > > /* Push the global flag_finite_loops state down to individual loops. */ > loop->finite_p = flag_finite_loops; > <rb18267.patch>
--- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-novect_gcond.c @@ -0,0 +1,39 @@ +/* { dg-add-options vect_early_break } */ +/* { dg-require-effective-target vect_early_break_hw } */ +/* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-O3" } */ + +/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */ + +#include "tree-vect.h" + +#define N 306 +#define NEEDLE 136 + +int table[N]; + +__attribute__ ((noipa)) +int foo (int i, unsigned short parse_tables_n) +{ + parse_tables_n >>= 9; + parse_tables_n += 11; +#pragma GCC novector + while (i < N && parse_tables_n--) + table[i++] = 0; + + return table[NEEDLE]; +} + +int main () +{ + check_vect (); + +#pragma GCC novector + for (int j = 0; j < N; j++) + table[j] = -1; + + if (foo (0, 0xFFFF) != 0) + __builtin_abort (); + + return 0; +} diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index cdd439fe7506e7bc33654ffa027b493f23d278ac..a29681bffb902d2d05e3f18764ab519aacb3c5bc 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -327,6 +327,10 @@ replace_loop_annotate (void) if (loop->latch) replace_loop_annotate_in_block (loop->latch, loop); + /* Then also check all other exits. */ + for (auto e : get_loop_exit_edges (loop)) + replace_loop_annotate_in_block (e->src, loop); + /* Push the global flag_finite_loops state down to individual loops. */ loop->finite_p = flag_finite_loops; }