From patchwork Mon Nov 6 07:39:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 161853 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2496317vqu; Sun, 5 Nov 2023 23:41:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUyegCxARCltn5jDjBpYK4DcnCg4O0MICdcudHQNLZ7fbUzfP7gdzfKHgKadmDA7BvGopK X-Received: by 2002:a05:6214:5006:b0:66d:48e4:9928 with SMTP id jo6-20020a056214500600b0066d48e49928mr38124746qvb.12.1699256462756; Sun, 05 Nov 2023 23:41:02 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1699256462; cv=pass; d=google.com; s=arc-20160816; b=0gM0eVOUbXC1RAWaoESYeiUyKo47IUAVEmAoBwXpM2HdipB4jPvfXj1jpKqX5MaKM9 MogEei4WqZoN82H3vBxLcrdlS9Km1VidtUMy0EhomF/iW31FXepy97vwSuM0bnOO6aC4 wX2SvQt54ZnZjk6IFrErIWFtP3SapcpCUpOCiw1cOTXr1RDLcF74/k1Uxf1gBkoPD8G+ vtVJYsDnaUrYQJdC6717mvfzKoSf04uicT8PH863z71gC6bvSzAzxs+jcn4vN8n5MYtU 0M8z8tsh8vNV+RFxm5oqkTudztsGDKG9BFoJ8lsC6vstEeU3SMVD2ac5RpNPK8GxuRiA nrNA== 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:in-reply-to:content-disposition :message-id:subject:cc:to:from:date:authentication-results-original :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=fyJT9jk25UBeAFhAZToxkL2ebtMh2LBOljxfgNozsIo=; fh=6lLuKcPp5JwcfhLsQ40FQN1vJS1KxlKbf2GiViQwbCM=; b=rg1Rl5ZmGkIcxDbW8EbTTMDEBBaPfPLnlP2J951CznE4hK7Y1T80znW1X6u1A9Ya1v 6AopP8MOOeFt/KTztrx3mQg4r7flxlpsXX8g4dc2DNAdDygHgYdtOy0ogVIUb9nUj7bn vs03ZqqkCTOzOsSQS4gUGDNCjqFVCmUwvnW7Fi0PUV0cYImer0YXe73cmgtfv+G7bd0m qOu6lGfOEsyx2KM11kP8VEsFsEpFHx583eu2kvYlou5iGHWgoRur0rw+gifBX017xuRz 5qeEIGqQIGr/ZkY1e9WVv0vqM/iAKZfUSriG1wT8LGLmz9wUeIiCJwUyXMl7WKlAtR1m iNhQ== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=JPgRX7m+; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=JPgRX7m+; arc=pass (i=3); 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bz9-20020ad44c09000000b0065b13b5cbe9si5238150qvb.459.2023.11.05.23.41.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:41:02 -0800 (PST) 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=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=JPgRX7m+; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=JPgRX7m+; arc=pass (i=3); 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=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 6B22E38654A2 for ; Mon, 6 Nov 2023 07:40:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2088.outbound.protection.outlook.com [40.107.21.88]) by sourceware.org (Postfix) with ESMTPS id 1D75038618C2 for ; Mon, 6 Nov 2023 07:40:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D75038618C2 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 1D75038618C2 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.21.88 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699256418; cv=pass; b=Idm67Wi7YgtqAj6VzKU38Vb1imJJ3UAaNXL6V/dLBjErYwGOeT8Ti948KmE9pgUb06EySOzRYoEz1QXn6/L2SI29jxp2Kkuyss9fYxAar80UjSblnhZZnExmdkDAtSOVGJwFr0brZF89zuj5FXw8EYcNy616mo2+UNaOTiVZcjM= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699256418; c=relaxed/simple; bh=MPkybzGZovfTi+Nunp7jvLtfLlWkXJBDucCDMhvaN0Q=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=Tn5fS4Z4PP9WL8hiaJLFYv95uNQ2UG+i5mioVzLsgU+25Odancc+gLGJIDwv/UrlUSF9a4Y3ycu8Gnx3HBnOmE7ivQdAgaY3BTvE3LCynA7pTlrZJAGMtyze0IEcpn146vb/HplmEwVdYHAJbBlIQXSiCAhv6xPdVbuoTpNqqss= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=J8fXiNgjy3rPzWnEvFNF/igjDs9xeNRbdOIHoN58S3Kcu2ok2Enat3gDiFbomusrXNlYsRAwMnSJJ4mTUK22cGAduwBc6E7cVNjGrT/QOQw7+bGwiH1kOVC13/0lFQJqVJ+rCTirjsudElOxdtl0L1V9krLlCau927p525+/g6geixhto21ILjAXVWKbHTWRV/MnJPgrgkqbI/1rEQCoAOKbirorSmEUUuY29R+tYAlPf4L1WzMAm/nludsYexFCx8zuo0xB5f3rhNf5Vp7aNxFO5Og/h5jSMSUqkeDjWsUZaosWByLOKalSNb7+rKy7jhlrDYQ+0XeCDFwHW5KADw== 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=fyJT9jk25UBeAFhAZToxkL2ebtMh2LBOljxfgNozsIo=; b=DTeam96BBVJNKIwDwtTGVPNG2DDffi/Zp2fBgAIjyfGH3oyIyjy5q6OBrIMsoE4sulbXFSXgyNGKg0MHhV3c+GTnEqGa8NtHS8bH/SNJAyOL1ly24PAEGreXtxrVeHqJCdEYI5Et6H+D1ykIKR+v5bsO/4rTdJnhlaPde0T3z4jcH6OXwVKczKkkdCMvMjEQZQT2G/W+5IHnK/AFZM57qBEEXOwSIVBhHceNlbe6G8nJirfhKLKAnatfchYrn1VPRMERpl85FNdUTUTxXZtt4onDbzRe6KnpwmD0lJTR3/tRE/9UWjkBsME6IfDbzB0x5cSWcUi5+H4jYawiruU3Yw== 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=fyJT9jk25UBeAFhAZToxkL2ebtMh2LBOljxfgNozsIo=; b=JPgRX7m+k+9SFLPd7tOD8X+6mCqhBXLILbXIR8hcGoka2VijyqnZ4de2xnxL8TdXke2YzYAXSwFKq2QhkkTm3EXMFTGd0aIhws3PlVgxnVWMMDsH5imK9l7lnJOhFzFn4hLbCZISlhHw1FLeUhmS7xLPB5HBCRYvWzciDAoJrug= Received: from AS9PR01CA0007.eurprd01.prod.exchangelabs.com (2603:10a6:20b:540::12) by PA4PR08MB7481.eurprd08.prod.outlook.com (2603:10a6:102:2a5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Mon, 6 Nov 2023 07:40:12 +0000 Received: from AMS0EPF000001AB.eurprd05.prod.outlook.com (2603:10a6:20b:540:cafe::eb) by AS9PR01CA0007.outlook.office365.com (2603:10a6:20b:540::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28 via Frontend Transport; Mon, 6 Nov 2023 07:40:11 +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 AMS0EPF000001AB.mail.protection.outlook.com (10.167.16.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.16 via Frontend Transport; Mon, 6 Nov 2023 07:40:10 +0000 Received: ("Tessian outbound 7c4ecdadb9e7:v228"); Mon, 06 Nov 2023 07:40:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ddc924bbcd0b3d86 X-CR-MTA-TID: 64aa7808 Received: from ff6f6acd6bca.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B53FA742-8F49-4512-A150-859E8051D59F.1; Mon, 06 Nov 2023 07:40:04 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ff6f6acd6bca.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 06 Nov 2023 07:40:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aB7WFXgSqnEFwIF4QnyAx/Yg9wgHNeKSQSsDL1FXY4IuHd9ut3b9Um5536dSA8QsMRiFuT03GtPthroaHZ75ctyM/4WAqTWpMMNf/lNKMJbtYpmikMPqa6aDFNDWxdg+jn7Ms7uXbQaRwznjBiqEzwLg2VN3BTJspu2lw2YKjafNVRaTHrg07vroga/MtqYLbtB2JTThrTWgf/kpuG1nXLUb5nhP7e4kcJvD6gZK/uZvxLxPEIrveFs2AfNQCRxapUMcrE40VHej3Ik9YXL+oX3cOzOcFrpXLYyFJMCOVhEF/xRzqvpeBbNiTkS7EuhN4+J2MgVGqouPLbXEhsxyuw== 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=fyJT9jk25UBeAFhAZToxkL2ebtMh2LBOljxfgNozsIo=; b=gJ5tEZsZ9BGquoJzDfC9V8bVsy35290/6I2Ud1GXUERbxJN1rxzyrrDaiLDG3ln/g1nPpepvciu7NTL1zOrz5vDkRrEJPqT9QzaSjneI7GcPIMli3lmQOwtaobL6cRXKGuAYE7VD7iA6q2mgpt8XnLe4qVL/5u4qBBHxk84aHiE8rxaSbYFs2WzrLoT8poRSSprmi/+RwHg01IgW9wjvPuqTSDJkasWKOQy1iW+RoZ+71+281YPaNSs5zd10+v8H3GbAEDx9L/aduzttcpApb8L57RSWPW6qtkEh9EvUPuXfIBTezkVOYZCeIexcvBUfp6JKb6XiLxVs02YyuPiqqQ== 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=fyJT9jk25UBeAFhAZToxkL2ebtMh2LBOljxfgNozsIo=; b=JPgRX7m+k+9SFLPd7tOD8X+6mCqhBXLILbXIR8hcGoka2VijyqnZ4de2xnxL8TdXke2YzYAXSwFKq2QhkkTm3EXMFTGd0aIhws3PlVgxnVWMMDsH5imK9l7lnJOhFzFn4hLbCZISlhHw1FLeUhmS7xLPB5HBCRYvWzciDAoJrug= 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 DBBPR08MB10676.eurprd08.prod.outlook.com (2603:10a6:10:530::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Mon, 6 Nov 2023 07:40:01 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::26aa:efdd:a74a:27d0]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::26aa:efdd:a74a:27d0%5]) with mapi id 15.20.6954.028; Mon, 6 Nov 2023 07:40:01 +0000 Date: Mon, 6 Nov 2023 07:39:57 +0000 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com Subject: [PATCH 10/21]middle-end: implement relevancy analysis support for control flow Message-ID: Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO2P265CA0181.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a::25) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|DBBPR08MB10676:EE_|AMS0EPF000001AB:EE_|PA4PR08MB7481:EE_ X-MS-Office365-Filtering-Correlation-Id: fb8f1ff7-65dd-4e77-73c0-08dbde9b9b4e 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: YwNn8xgkWYO+XpryqWi5+Y5vjQXWnjt84D7p2KOSIko2uoZgpaHqWNoUmE4I1OFOOAEP15oylWM3jUAKuYlQp/JPQnGS66zp4eDXnHQr/2U8mZCoKDvdHCVnlr5Fehyq/N5tCy/P2QZkjPRcM0VdrIizWcJPgfKzxZnmMTmnMn65Pj4gykRVvZzHfeM0ZB1wjDKhL1nC9/1Zp6EZbxKcoZmYalWzxogQ2Oz+DTIuW+UkhHFAAMdHt+2il2MLecD1VRsnjhcXyCKOnESvzyu6PzKkWKo5mv+QdRJJScl9J2DzeibbKdRAJaoimTQwxwUHpHKOl9c5W40/bnJT9t8yH/6/4r2/bSJJWLkf710wEc3UPUbznSNRHwe5vKvYOeQUHIBGO/M7m73yaluwBkDREMI6w5t2gAZSbWw1z7hM6X1hKoFAJKkWiQ2xfBHTirCuFE6YzRYZ+kzlFal5nwkA4B++nbfD0LcSSE7EppnVjWHMFocZe7zLqQCnJftAiMa5d7ggDGEbG0N4zbMHT/vj89T+Ou9no2yltVcanrVwNwkT8ubLH8iq/3RBYm9FKHGZTvw0oU7v8SATQDsB3hARTjocL2gyPKy06dpx3hVg150IBOSD0yjzPyaRF/XcF0Ad 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)(136003)(396003)(376002)(366004)(346002)(39860400002)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(6916009)(4326008)(8676002)(8936002)(41300700001)(36756003)(2906002)(235185007)(38100700002)(5660300002)(6486002)(66556008)(6512007)(316002)(66476007)(86362001)(44832011)(4743002)(66946007)(83380400001)(26005)(2616005)(6666004)(6506007)(478600001)(33964004)(44144004)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10676 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: AMS0EPF000001AB.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2a206fb2-8813-4755-da63-08dbde9b9587 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R+cHWvLobyIPTCAtojMF56B/Ne1Lbmt+q5Ji0zN+kv1bSJE2TPvJ5VfH04kHD5YPNfR4KfDFLa9I8mNmyBSa9pjeNu7zBvgavFlAP/slEq4hVIJTLePRllIG/nyg+ofLpmUvbd4wm1KhyjD8Sg1LTPFbsldtvNdT9g9uVHWG4PXjo2cG9xQoy+H0SqhKNYWBAFSib14pHcRvr9fEPcvwev30FCT+QY08AxKvJ8E8l7efPkBhXxOs9+y9wSE+n4K50Pw4h5EpTbSMw5GfdRd5NRKUMXAu/j6R15db0YfVJCol90J46JcCkkSUUVi/fEcwZ8bBC3GrdEvvqcettJkGzGj9eqHvK9R+lLxr6gLqatrD8Whqwkco7dx8UimIy00i6Q1+MdJNdHDgCdqHKzhmEqQPPJUuF+XBBXzUARRglh0/GXOp3LeCbkNuhv/+LI2SCVYnrkzey8VMmrl8B3PcIWHJjVwnCgeGjYwuI+aHCseD/mGFwJ13owzUvB242aChByrwUccjlwNDfP1Y416iNX2RLbkOfLNhMa9B4rkCqS3lbSju4Y59iOPkGQm6z28PjWXV8NmXh4uu78de4khPT43TbgbPacpu9vysCBAgJGE+w5MN00ia7e29NMAEVq2TvpgHDkEDXwd9kzTOiBT/nJJIZs008RQ5/9Ck0wGx9pAOt80wFvTxXilcgP4NWDq0hojS6qIL1vir0T4dxZhrNkbvVnUNl0+szJpKetOWBC33/zyjockQWmeQuc8ESfIG6DycAv3pUwP1PYHBmcqf7g== 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)(136003)(396003)(376002)(346002)(39860400002)(230922051799003)(186009)(64100799003)(1800799009)(82310400011)(451199024)(46966006)(36840700001)(40470700004)(6916009)(4326008)(8676002)(8936002)(41300700001)(36756003)(40480700001)(2906002)(235185007)(36860700001)(5660300002)(6486002)(6512007)(356005)(316002)(86362001)(44832011)(47076005)(81166007)(4743002)(70206006)(70586007)(83380400001)(336012)(40460700003)(26005)(82740400003)(2616005)(107886003)(6666004)(6506007)(478600001)(33964004)(44144004)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2023 07:40:10.9339 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb8f1ff7-65dd-4e77-73c0-08dbde9b9b4e 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: AMS0EPF000001AB.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB7481 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781799544747511424 X-GMAIL-MSGID: 1781799544747511424 Hi All, This updates relevancy analysis to support marking gcond's belonging to early breaks as relevant for vectorization. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * tree-vect-stmts.cc (vect_stmt_relevant_p, vect_mark_stmts_to_be_vectorized, vect_analyze_stmt, vect_is_simple_use, vect_get_vector_types_for_stmt): Support early breaks. --- inline copy of patch -- diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 4809b822632279493a843d402a833c9267bb315e..31474e923cc3feb2604ca2882ecfb300cd211679 100644 --- diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 4809b822632279493a843d402a833c9267bb315e..31474e923cc3feb2604ca2882ecfb300cd211679 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -359,9 +359,14 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo, *live_p = false; /* cond stmt other than loop exit cond. */ - if (is_ctrl_stmt (stmt_info->stmt) - && STMT_VINFO_TYPE (stmt_info) != loop_exit_ctrl_vec_info_type) - *relevant = vect_used_in_scope; + gimple *stmt = STMT_VINFO_STMT (stmt_info); + if (is_ctrl_stmt (stmt) && is_a (stmt)) + { + gcond *cond = as_a (stmt); + if (LOOP_VINFO_LOOP_CONDS (loop_vinfo).contains (cond) + && LOOP_VINFO_LOOP_IV_COND (loop_vinfo) != cond) + *relevant = vect_used_in_scope; + } /* changing memory. */ if (gimple_code (stmt_info->stmt) != GIMPLE_PHI) @@ -374,6 +379,11 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo, *relevant = vect_used_in_scope; } + auto_vec exits = get_loop_exit_edges (loop); + auto_bitmap exit_bbs; + for (edge exit : exits) + bitmap_set_bit (exit_bbs, exit->dest->index); + /* uses outside the loop. */ FOR_EACH_PHI_OR_STMT_DEF (def_p, stmt_info->stmt, op_iter, SSA_OP_DEF) { @@ -392,7 +402,6 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo, /* We expect all such uses to be in the loop exit phis (because of loop closed form) */ gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI); - gcc_assert (bb == single_exit (loop)->dest); *live_p = true; } @@ -793,6 +802,20 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo, bool *fatal) return res; } } + } + else if (gcond *cond = dyn_cast (stmt_vinfo->stmt)) + { + enum tree_code rhs_code = gimple_cond_code (cond); + gcc_assert (TREE_CODE_CLASS (rhs_code) == tcc_comparison); + opt_result res + = process_use (stmt_vinfo, gimple_cond_lhs (cond), + loop_vinfo, relevant, &worklist, false); + if (!res) + return res; + res = process_use (stmt_vinfo, gimple_cond_rhs (cond), + loop_vinfo, relevant, &worklist, false); + if (!res) + return res; } else if (gcall *call = dyn_cast (stmt_vinfo->stmt)) { @@ -13043,11 +13066,15 @@ vect_analyze_stmt (vec_info *vinfo, node_instance, cost_vec); if (!res) return res; - } + } + + if (is_ctrl_stmt (stmt_info->stmt)) + STMT_VINFO_DEF_TYPE (stmt_info) = vect_early_exit_def; switch (STMT_VINFO_DEF_TYPE (stmt_info)) { case vect_internal_def: + case vect_early_exit_def: break; case vect_reduction_def: @@ -13080,6 +13107,7 @@ vect_analyze_stmt (vec_info *vinfo, { gcall *call = dyn_cast (stmt_info->stmt); gcc_assert (STMT_VINFO_VECTYPE (stmt_info) + || gimple_code (stmt_info->stmt) == GIMPLE_COND || (call && gimple_call_lhs (call) == NULL_TREE)); *need_to_vectorize = true; } @@ -13835,6 +13863,14 @@ vect_is_simple_use (vec_info *vinfo, stmt_vec_info stmt, slp_tree slp_node, else *op = gimple_op (ass, operand + 1); } + else if (gcond *cond = dyn_cast (stmt->stmt)) + { + gimple_match_op m_op; + if (!gimple_extract_op (cond, &m_op)) + return false; + gcc_assert (m_op.code.is_tree_code ()); + *op = m_op.ops[operand]; + } else if (gcall *call = dyn_cast (stmt->stmt)) *op = gimple_call_arg (call, operand); else @@ -14445,6 +14481,8 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info, *nunits_vectype_out = NULL_TREE; if (gimple_get_lhs (stmt) == NULL_TREE + /* Allow vector conditionals through here. */ + && !is_ctrl_stmt (stmt) /* MASK_STORE has no lhs, but is ok. */ && !gimple_call_internal_p (stmt, IFN_MASK_STORE)) { @@ -14461,7 +14499,7 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info, } return opt_result::failure_at (stmt, - "not vectorized: irregular stmt.%G", stmt); + "not vectorized: irregular stmt: %G", stmt); } tree vectype; @@ -14490,6 +14528,14 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info, scalar_type = TREE_TYPE (DR_REF (dr)); else if (gimple_call_internal_p (stmt, IFN_MASK_STORE)) scalar_type = TREE_TYPE (gimple_call_arg (stmt, 3)); + else if (is_ctrl_stmt (stmt)) + { + gcond *cond = dyn_cast (stmt); + if (!cond) + return opt_result::failure_at (stmt, "not vectorized: unsupported" + " control flow statement.\n"); + scalar_type = TREE_TYPE (gimple_cond_rhs (stmt)); + } else scalar_type = TREE_TYPE (gimple_get_lhs (stmt)); --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -359,9 +359,14 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo, *live_p = false; /* cond stmt other than loop exit cond. */ - if (is_ctrl_stmt (stmt_info->stmt) - && STMT_VINFO_TYPE (stmt_info) != loop_exit_ctrl_vec_info_type) - *relevant = vect_used_in_scope; + gimple *stmt = STMT_VINFO_STMT (stmt_info); + if (is_ctrl_stmt (stmt) && is_a (stmt)) + { + gcond *cond = as_a (stmt); + if (LOOP_VINFO_LOOP_CONDS (loop_vinfo).contains (cond) + && LOOP_VINFO_LOOP_IV_COND (loop_vinfo) != cond) + *relevant = vect_used_in_scope; + } /* changing memory. */ if (gimple_code (stmt_info->stmt) != GIMPLE_PHI) @@ -374,6 +379,11 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo, *relevant = vect_used_in_scope; } + auto_vec exits = get_loop_exit_edges (loop); + auto_bitmap exit_bbs; + for (edge exit : exits) + bitmap_set_bit (exit_bbs, exit->dest->index); + /* uses outside the loop. */ FOR_EACH_PHI_OR_STMT_DEF (def_p, stmt_info->stmt, op_iter, SSA_OP_DEF) { @@ -392,7 +402,6 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo, /* We expect all such uses to be in the loop exit phis (because of loop closed form) */ gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI); - gcc_assert (bb == single_exit (loop)->dest); *live_p = true; } @@ -793,6 +802,20 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo, bool *fatal) return res; } } + } + else if (gcond *cond = dyn_cast (stmt_vinfo->stmt)) + { + enum tree_code rhs_code = gimple_cond_code (cond); + gcc_assert (TREE_CODE_CLASS (rhs_code) == tcc_comparison); + opt_result res + = process_use (stmt_vinfo, gimple_cond_lhs (cond), + loop_vinfo, relevant, &worklist, false); + if (!res) + return res; + res = process_use (stmt_vinfo, gimple_cond_rhs (cond), + loop_vinfo, relevant, &worklist, false); + if (!res) + return res; } else if (gcall *call = dyn_cast (stmt_vinfo->stmt)) { @@ -13043,11 +13066,15 @@ vect_analyze_stmt (vec_info *vinfo, node_instance, cost_vec); if (!res) return res; - } + } + + if (is_ctrl_stmt (stmt_info->stmt)) + STMT_VINFO_DEF_TYPE (stmt_info) = vect_early_exit_def; switch (STMT_VINFO_DEF_TYPE (stmt_info)) { case vect_internal_def: + case vect_early_exit_def: break; case vect_reduction_def: @@ -13080,6 +13107,7 @@ vect_analyze_stmt (vec_info *vinfo, { gcall *call = dyn_cast (stmt_info->stmt); gcc_assert (STMT_VINFO_VECTYPE (stmt_info) + || gimple_code (stmt_info->stmt) == GIMPLE_COND || (call && gimple_call_lhs (call) == NULL_TREE)); *need_to_vectorize = true; } @@ -13835,6 +13863,14 @@ vect_is_simple_use (vec_info *vinfo, stmt_vec_info stmt, slp_tree slp_node, else *op = gimple_op (ass, operand + 1); } + else if (gcond *cond = dyn_cast (stmt->stmt)) + { + gimple_match_op m_op; + if (!gimple_extract_op (cond, &m_op)) + return false; + gcc_assert (m_op.code.is_tree_code ()); + *op = m_op.ops[operand]; + } else if (gcall *call = dyn_cast (stmt->stmt)) *op = gimple_call_arg (call, operand); else @@ -14445,6 +14481,8 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info, *nunits_vectype_out = NULL_TREE; if (gimple_get_lhs (stmt) == NULL_TREE + /* Allow vector conditionals through here. */ + && !is_ctrl_stmt (stmt) /* MASK_STORE has no lhs, but is ok. */ && !gimple_call_internal_p (stmt, IFN_MASK_STORE)) { @@ -14461,7 +14499,7 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info, } return opt_result::failure_at (stmt, - "not vectorized: irregular stmt.%G", stmt); + "not vectorized: irregular stmt: %G", stmt); } tree vectype; @@ -14490,6 +14528,14 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info, scalar_type = TREE_TYPE (DR_REF (dr)); else if (gimple_call_internal_p (stmt, IFN_MASK_STORE)) scalar_type = TREE_TYPE (gimple_call_arg (stmt, 3)); + else if (is_ctrl_stmt (stmt)) + { + gcond *cond = dyn_cast (stmt); + if (!cond) + return opt_result::failure_at (stmt, "not vectorized: unsupported" + " control flow statement.\n"); + scalar_type = TREE_TYPE (gimple_cond_rhs (stmt)); + } else scalar_type = TREE_TYPE (gimple_get_lhs (stmt));