From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 1FA9B3858D38 for ; Wed, 12 Jul 2023 09:13:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1FA9B3858D38 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-pg1-x536.google.com with SMTP id 41be03b00d2f7-5440e98616cso360264a12.0 for ; Wed, 12 Jul 2023 02:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1689153188; x=1691745188; 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=nDikTpotuAxA9dfCfEKYtBIqSkbJ6YHsYJKNGoy6vuA=; b=j5M+XB/L4Nt1SaD+agc48/jH+oEBYdGzKkZLnjyh40j7Lp2gjwbmtw6SV7qyr/3x6m MQORfMM5MFe6Mx2863mUfdseaUmelxNu0j4Am2OBewghV+O23jRA+am0RAfK/CL3/Pqw 35ckV+6ZdXTCBXR1pzmc3HH8xQ8OKSsZpU7jSceAb+lVjQejsDvZKH4YUvnCbClVhMeg hKPPLkYvrvx1IBsC/Ru7ltuR8ZmEYKLtjMs/+uPChrTwwYvJgdtraX7Dv28/Zm8L5sSj TKgdAsG4BeWheVL3d6bxOQ8PHZ93QV7pX9LbVr+CX106T6JhbvJ1+R38Y8in4PF8m8o9 0skw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689153188; x=1691745188; 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=nDikTpotuAxA9dfCfEKYtBIqSkbJ6YHsYJKNGoy6vuA=; b=YUnSTv3kNGgHweyJKrEv8zw7A4uPL7og91rmvNiKDrh2nZEPomeibJWpDU6LppHBtm S08XSXuNjo92eOE1+XcRLsw/lTA3dGJqkH3kdvPv4xaQHYtmWBOOsLVV92ZUiDc8GO8J hekKQTQ8f6Wx8NsDwrQQ45aDNi/Ylfh3jp3Kd7u446Uz5PmjeTmPEwqyva6e6K6yrdYA /7BVq6sKJoeKkjienZhHD46FxB7n013/59jR7Y0ZEFdo3BIPtl/YhBG4VP3cb05HktZk nnwDG4huFtE+po9MkIsdKIIvqGzUvNPtG93fyMOngmznhQ/yccRVtbTr1S3L+BS7J0Z0 Dukg== X-Gm-Message-State: ABy/qLYDsvTMz6jFrPmrhNEKH0DYRrZwrTgVrUAr7aM5+nwY4hzphk+w W5UbqM+4W4kyxVwuAz2qPqOBA7bS5yOdfxtp48RxZA== X-Google-Smtp-Source: APBJJlGeNOvgkVl0S5L+iVe8il7F1p4NRZEkFfxTvcSQMA04RJ852yfJPmcRNvL5z1Edcui/kYOMKUJ9C50T8xxL1So= X-Received: by 2002:a17:90b:3614:b0:262:ca9c:edcb with SMTP id ml20-20020a17090b361400b00262ca9cedcbmr1950595pjb.9.1689153187760; Wed, 12 Jul 2023 02:13:07 -0700 (PDT) MIME-Version: 1.0 References: <20230615172817.3587006-1-manolis.tsamis@vrull.eu> In-Reply-To: From: Manolis Tsamis Date: Wed, 12 Jul 2023 12:12:31 +0300 Message-ID: Subject: Re: [PATCH v2] Implement new RTL optimizations pass: fold-mem-offsets. To: Hans-Peter Nilsson Cc: gcc-patches@gcc.gnu.org, Richard Biener , Philipp Tomsich , Jeff Law Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.9 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 Mon, Jul 10, 2023 at 12:58=E2=80=AFAM Hans-Peter Nilsson wrote: > > On Sun, 9 Jul 2023, Hans-Peter Nilsson wrote: > > > On Thu, 15 Jun 2023, Manolis Tsamis wrote: > > > > > This is a new RTL pass that tries to optimize memory offset calculati= ons > > > by moving them from add immediate instructions to the memory loads/st= ores. > > > It punts on all "use" insns that are not SET. > > Why not use single_set there too? > > Also, I don't see insn costs considered? > (Also: typo "immidiate".) > The only change that this pass does is to change offsets where possible and then simplify add immediate instructions to register moves. I don't see how this could result in worse performance and by extension I don't see where insn costs could be used. Do you have any thoughts about where to use the costs? Thanks! Manolis > brgds, H-P