From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 733A2384F6C8 for ; Wed, 23 Nov 2022 20:03:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 733A2384F6C8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x229.google.com with SMTP id q7so2168281ljp.9 for ; Wed, 23 Nov 2022 12:03:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nRTAWz5jvrmw8hM5R8mDg8NyvYJaSPRetVwtptnmVmw=; b=RLA6itlgdJyU2FtSfRlseCAbBSaJQDjl9FTAJji4A1FPgz1Kq7z4izcQsEtlxAXjMj J+OBztUR6xZ8hMZQzuNo4txabDiSI3CR9zk+99RiuZ4rFsI67ivktfIXK6MsfGtkdbEx 85EIUo8XOWyUdD5wOoS7zLYHXerDVzm94KOgJxPICyw/p3z2DooMUD7gmhBpOD28ls99 GiALPGxrJqcsKjHbv3YtuWrbdqGFDoMaMLL6j2dnlJtBTWaBH6f51B+USA+JJGcpzNSN 1mKpIUfXOja7v1V0tddKG+Pcl5aTPza2ZR4zUMhsROUZmakKkBo3wXshSBhAfni2PnFY 4GIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=nRTAWz5jvrmw8hM5R8mDg8NyvYJaSPRetVwtptnmVmw=; b=h0B32wUIuJSkqkJNMpjmkh72alYvg8GO4/VUdTSM32gDZzlEUob8sQBO6QKz4mUmPt N6LC+pwVQhAr4Z827CAmQDBb/966vbwYT3mZHB4VlpUQdKEVNt/OJdffv09fGqorkAlZ g7377Eh/7LPG3AJQttLEzO41yxKMJYySWhEzSaDzWRu/AUW+v+FtDxCj5IOidsKinFq/ t6+oQF7fk1IMAQCce/OxKqfRV2s02PXu8AxbkBcq506QzFQVfSYxNEUA69hlggdlZDOx CkdkFbDmymiczLOtQrJVYpRl4IOGSlGcgY4rDS7jnQDFT0z3gaEBnkhroiEUddGeNO4I alIQ== X-Gm-Message-State: ANoB5pn+Llr+x+dwjioSxXvyfn5zYrpk829yhztDtp64+GmT5KkED9bF VRUhscAEEBgUty9gxsQ/lJVflt9Q7DG5n80KKOo= X-Google-Smtp-Source: AA0mqf7t4WiBCOBDOXiymB51UovULBqGJMIertM5zP9hAylwqwMQUlNfNXY0BDxrIc31sTMBATLvldfLAmmYCOQGuEw= X-Received: by 2002:a2e:8ed8:0:b0:279:78e1:c7a4 with SMTP id e24-20020a2e8ed8000000b0027978e1c7a4mr1624789ljl.529.1669233786647; Wed, 23 Nov 2022 12:03:06 -0800 (PST) MIME-Version: 1.0 References: <20221116235429.25268-1-hongyu.wang@intel.com> <20221118144600.GZ25951@gate.crashing.org> In-Reply-To: From: Richard Biener Date: Wed, 23 Nov 2022 21:02:53 +0100 Message-ID: Subject: Re: [PATCH] rs6000: Adjust loop_unroll_adjust to match middle-end change [PR 107692] To: Hongyu Wang Cc: Segher Boessenkool , Hongyu Wang , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Nov 23, 2022 at 2:53 AM Hongyu Wang wrote: > > Hi, Segher and Richard > > > > Something in your patch was wrong, please fix that (or revert the > > > patch). You should not have to touch config/rs6000/ at all. > > > > Sure something is wrong, but I think there's the opportunity to > > simplify rs6000/ and s390x/, the only other two implementors of > > the hook used. > > If I understand correctly, the wrong part is we should not break the > logic of -funroll-loops and check OPTION_SET_P in > targetm.loop_unroll_adjust to pretend the loop-unrolling is disabled > with -fno-unroll-loops. > I don't have a good idea to resolve this, perhaps add another hook and > check OPTION_SET_P (flag_unroll_loops) && munroll_only_small_loops > there and use that hook in rtl_loop_unroll::gate (), but still it > doesn't work if we want to strictly follow the logic that > -munroll-only-small-loops should not enable loop unrolling. > IMHO the middle-end part with target hook looks quite tricky (and of > course the OPTION_SET_P in the target hook). So Richard if you agree, > I'd like to install the reversion patch posted in > https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606774.html > and move all them to the backend first. Fine by me. Richard. > -- > Regards, > > Hongyu, Wang