From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 76F03385800F for ; Tue, 21 Nov 2023 18:11:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 76F03385800F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 76F03385800F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700590284; cv=none; b=Pp+vXjc0px+QqYieX9HBKL+HtLO95NNIvQSHOjoz8C5jr1GebnSv/NFbU10Pj1HFsRJt/Ur5Keph4lTqVqEqCEbQjrWMj5vCRiaNoypHu/49xuUA6ILF47njBDAVl9fT0jAQ8/YN5XyeMVMTyShP9GneM1ZJmNP7eCumchDZh9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700590284; c=relaxed/simple; bh=4yUrs9hf2RVQToMWAoWDDSe0XCIA2EFnQ0blHMJcPtw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=WYJLr3No33AzzP2R6sU6qXzUwtaqaM0oLXJzpGa/iRnCue9MeJKkurnZeVXsfp1IfovAcxsnLreIGOAFrCB+P/caPj4WsgfY0JMu54hwKNkRPv0j2hm9jd3gitBq4HYWKCXprEohWpfqsPBjIeLB0WJdrDL5AMtf7Ohe+JW6NSk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-53fa455cd94so3906610a12.2 for ; Tue, 21 Nov 2023 10:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700590281; x=1701195081; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LqkkbbrVskhprSjMN38ZIQvOW1JJvPtoHsWwz4lmiLQ=; b=iwPbj+ROpZFg9ko4rByk6lcWQZW3svVIGHQq49wJ0aqUlUkikS3WrVX/kUQ5g7kuWq OXurYGZOL5sT1131YckxWjPc2Y7tFvlg7M8MtHM20cK+UvdaW80Vkb/HC72PmUBPxG4U CTMbE72+WScH7O2AXJCv9PEm5G3f9Fc/5Rn7AasrNDDjPFm87e+yLmqAEsSTbeOU/3pl hF4iZcE/KK9f0YFFSLUXaAD+BB4Ru/2aF9EvuoZh2Pkdm2aml3irw9dTeHL1Ab+Lmvti xuzcH4tjJseGqO0WOuQJAVSkrm2f2rf+eduvlPBxr/fcDh9x+AyMoDo458DdDRefeyPV 1TGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700590281; x=1701195081; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LqkkbbrVskhprSjMN38ZIQvOW1JJvPtoHsWwz4lmiLQ=; b=bAcGB/6FlN9gCqqm17JZkOt3NRyTE+X/VYn0rtSHn/WQaszkjqrxfVl3SOsR1sCc2/ 0fZ9YqCQ0kMjMYsXKMZDD8l38iG4ijJA5xJ94GHMeOS76HX2wmsrjnoNXiOMZn2TPbet PKqRvzVU+pjYUWzLA2PvVNC/DR3T0HDJ2zOxA2VoUmcx38EPN/BpdljcuesECuVn7nfe bTRRtoyKptHHED1/BQm4ELPdoBsmyYVpWFtiVhknsi/5yEYFEPGENIMWwtwiOCiveqZZ UH2JiX3dbpjgnjoO/O2suPpIW9ULIeYAakLe8gyL8wsPCm1z7iyoveobDz1bc+Tkp+HO gPbA== X-Gm-Message-State: AOJu0YzDCiq9VtgA7T239a5ETLq3kd5900rAEV6dK6vFBCoTpAcTnBSx aXxlLNut90Eh7+uJilWich55byi96f1ZIR6mCUhkkg== X-Google-Smtp-Source: AGHT+IF9VQx827HZFoiGOnMyeC91HQLl1pSEYfsjtyttYgYxemER6ibt7aATdydNPAI3pRoNxyGckSDAukpLEW7qQFY= X-Received: by 2002:a17:90b:4b04:b0:281:b37:2038 with SMTP id lx4-20020a17090b4b0400b002810b372038mr9401958pjb.1.1700590281368; Tue, 21 Nov 2023 10:11:21 -0800 (PST) MIME-Version: 1.0 References: <20230830101400.1539313-1-manolis.tsamis@vrull.eu> <20230830101400.1539313-4-manolis.tsamis@vrull.eu> <65cacabf-0954-404a-b7c7-5fce9caec862@gmail.com> In-Reply-To: From: Manolis Tsamis Date: Tue, 21 Nov 2023 20:10:45 +0200 Message-ID: Subject: Re: [PATCH v3 3/4] ifcvt: Handle multiple rewired regs and refactor noce_convert_multiple_sets To: Jeff Law Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek , Richard Sandiford Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I have made this independent from the rest of the series, cleaned up some comments and moved some code to its original position. Re-submitted as https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637660.html. Manolis On Mon, Nov 13, 2023 at 2:40=E2=80=AFPM Manolis Tsamis wrote: > > Hi Jeff, > > Indeed, that sounds like a good idea. I will make this separate and > send it after the required testing. > I'll see what can be done about a testcase. > > Best, > Manolis > > On Sat, Nov 11, 2023 at 1:20=E2=80=AFAM Jeff Law = wrote: > > > > > > > > On 8/30/23 04:13, Manolis Tsamis wrote: > > > The existing implementation of need_cmov_or_rewire and > > > noce_convert_multiple_sets_1 assumes that sets are either REG or SUBR= EG. > > > This commit enchances them so they can handle/rewire arbitrary set st= atements. > > > > > > To do that a new helper struct noce_multiple_sets_info is introduced = which is > > > used by noce_convert_multiple_sets and its helper functions. This res= ults in > > > cleaner function signatures, improved efficientcy (a number of vecs a= nd hash > > > set/map are replaced with a single vec of struct) and simplicity. > > > > > > gcc/ChangeLog: > > > > > > * ifcvt.cc (need_cmov_or_rewire): Renamed init_noce_multiple_se= ts_info. > > > (init_noce_multiple_sets_info): Initialize noce_multiple_sets_i= nfo. > > > (noce_convert_multiple_sets_1): Use noce_multiple_sets_info and= handle > > > rewiring of multiple registers. > > > (noce_convert_multiple_sets): Updated to use noce_multiple_sets= _info. > > > * ifcvt.h (struct noce_multiple_sets_info): Introduce new struc= t > > > noce_multiple_sets_info to store info for noce_convert_multiple= _sets. > > > > > > gcc/testsuite/ChangeLog: > > > > > > * gcc.target/aarch64/ifcvt_multiple_sets_rewire.c: New test. > > So this seems like (in theory) it could move forward independently. Th= e > > handling of arbitrary statements code wouldn't be exercised yet, but > > that's OK IMHO as I don't think anyone is fundamentally against trying > > to handle additional kinds of statements. > > > > So my suggestion would be to bootstrap & regression test this > > independently. AFAICT this should have no functional change if it were > > to go in on its own. Note the testsuite entry might not be applicable > > if this were to go in on its own and would need to roll into another > > patch in the series. > > > > > > Jeff