From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 6DC203858D32 for ; Thu, 25 May 2023 14:18:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6DC203858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-96fdc081cb3so106002866b.2 for ; Thu, 25 May 2023 07:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1685024333; x=1687616333; 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=vwiY97FJhWfNJ8L/1v6aKAUVuY1Tvb2RM/g7qLHT8IA=; b=J0x18tx6ftaio6MJztT6LoFvduV1GlNDpB9hyphjMMFrJqJF9RTooJ3ngmkWtZ8se5 UUU9KNUmswT2Nste1HPeWPGNYiQxuzL15k21eniaeB3mM+8I9vTPTlRFWhj+Fh8SyKqt JXJM+OofvylnHoHeVsSiFoS3j5x5yjdnEhKDljQDUpTvRLgVsTZ9CFyDbHsiOdAnfq2U 97sIhSb2xbeisWsoOLAJjpIk9Kr8uiBizZqdMNAFvWNItoneQZg69YumhxiZuvkW19Tm 0hrMkAoc0au4WiTOCkHa2GHcST/y5Oz2ku9NukWtrW/ciEFa4hcAfkNaDq7II5x+XFNm 9FCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685024333; x=1687616333; 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=vwiY97FJhWfNJ8L/1v6aKAUVuY1Tvb2RM/g7qLHT8IA=; b=Pxo8R5rI/noIQxRS2nLHuoUUsXM8+3jJJhKhsIvPXfvQX0tGRjlxtY9KQi+mCbaPPd Tlho0x8/YQq6y8+j50jysKhYsASWkQ0J9x6330WGSi3lt8YUVjl28tX/C184OZxuw3JN YzXSMFo1dvtoPHYV8amMqzJB0dv4oBS9h7gOaiqodBfigxP/PBd8d+mEY+p36tXaTm4+ tj8W/u1TLlhyHMOQXIkpEXR7omWW9h/rYl1zkYKcJABq/BYQIl0NqleE/85mLb/SqzXP E7bXy4WS5CUNjr4hM6NbiuMicFvGZTnPNR3ezfT9JCQmBW0802umcjQTfzRC6COoU1p3 wChg== X-Gm-Message-State: AC+VfDxuo4gSnP/bV9lwrqzQ7CkrIAW7OINmV0fYSnU+ZGowcG1/kCLI ARM4BCvPSt7eYFoAuukGK2b+BvGV/9nGGimB4QGwFw== X-Google-Smtp-Source: ACHHUZ5z/mgJaa9Qz8m2DysQs7dOTi8Exu2FFFoBbYQGPqFyNN9k9Ttg+S/KTNsvdOgh3vMmlxaMLk8qIN4DmAyLxW8= X-Received: by 2002:a17:907:60d2:b0:960:d9d:ffb5 with SMTP id hv18-20020a17090760d200b009600d9dffb5mr1907047ejc.41.1685024332843; Thu, 25 May 2023 07:18:52 -0700 (PDT) MIME-Version: 1.0 References: <20230525123550.1072506-1-manolis.tsamis@vrull.eu> <20230525123550.1072506-2-manolis.tsamis@vrull.eu> In-Reply-To: From: Philipp Tomsich Date: Thu, 25 May 2023 16:18:41 +0200 Message-ID: Subject: Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets. To: Jeff Law Cc: Richard Biener , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,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: On Thu, 25 May 2023 at 16:14, Jeff Law via Gcc-patches wrote: > > > > On 5/25/23 07:50, Richard Biener wrote: > > On Thu, May 25, 2023 at 3:32=E2=80=AFPM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> > >> On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: > >>> On Thu, May 25, 2023 at 2:36=E2=80=AFPM Manolis Tsamis wrote: > >>>> > >>>> Implementation of the new RISC-V optimization pass for memory offset > >>>> calculations, documentation and testcases. > >>> > >>> Why do fwprop or combine not what you want to do? At least for stack variables, the virtual-stack-vars is not resolved until reload. So combine will be running much too early to be of any use (and I haven't recently looked at whether one of the propagation passes runs after). Philipp. > >> I think a lot of them end up coming from register elimination. > > > > Why isn't this a problem for other targets then? Or maybe it is and th= is > > shouldn't be a machine specific pass? Maybe postreload-gcse should > > perform strength reduction (I can't think of any other post reload pass > > that would do something even remotely related). > It is to some degree. I ran into similar problems at my prior employer. > We ended up working around it in the target files in a different way > -- which didn't work when I quickly tried it on RISC-V. > > Seems like it would be worth another investigative step as part of the > evaluation of this patch. I wasn't at 100% when I did that poking > around many months ago. > > Jeff