From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 7E9863858C62 for ; Wed, 12 Jul 2023 14:14:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E9863858C62 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-pl1-x633.google.com with SMTP id d9443c01a7336-1b8b2b60731so32332635ad.2 for ; Wed, 12 Jul 2023 07:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689171240; x=1691763240; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=eZsg2f4u2YM2H72wbNsbjeSQpyzTT1aHu9yrgRsQZqQ=; b=lBJvvoKDvvTsoGHyVS1KKLpLWnjzOuKK7BShswWSkg3rwLqcJHajk9xsXJ8UKb4MRk 7x2yGXug09hGBmIl97INPoV3Fowp9wUAMIl/NQ4trvRNzPGpS/e5WH9M9veg59WSR9PW JT2g3lQAMoKGRnqThWCVR4eLEYQ5mTks3N6fLaP8LE/S9zy1p6DtDVmWW96LNy2v2OnW o7XnlSTui6l2Lbif7s8wzpWLBqfOkf1AR1yfdHvg4+wB0P3XgVPrE2OkgREou5Q6gUIz 7O3RBQYjKQl7/nQC2r7paHBUvhVJfX8/V5Ll1l8W6nFWfcKj5d9u0292HC+iug8yWvyC RutQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689171240; x=1691763240; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eZsg2f4u2YM2H72wbNsbjeSQpyzTT1aHu9yrgRsQZqQ=; b=JYVx32KX8pimVMM5Yc+jPEFr9hZbm5gDYBuVXB6JtvGBa+M7suoDrgaNwQ2+9JN9ht JkEDAFkgbBXFcdvG2QnIGwdn+bFQ6xmKv6gRIYIsQSfmQ/Aeof6TMPdEhgUGMnrRRbQ5 onNfhK5207eOc5+TENYLDZwRabu74AMwz5BeG0DTW0Yv4T7QC+7tEQRySRDrdS1fTtgX bG1Q8bBbpZOPdILZTJr5YleMIGvVi5lf3bDoz0gODKrTLOkc7jyk77aup8TKB1tGqS7F zRRVhgpaFeVTMxNpYjktNnfPlRv1hXIC1/sKIxhamZkiR3n0ndhgfJ+vnwO57INTlxcj smQA== X-Gm-Message-State: ABy/qLaCIRB8gw2JcOJ/eR1KiwwyGH9CsPSVCql/83+NI9ZP8TRUmsTH Cw+j8zGAJMkBa7G7t0cI6HU= X-Google-Smtp-Source: APBJJlHfIuYFdwPNGqohz1kVYNy2HhbJaMxMemznu3hy+/8V3iFqbcjc3DY8i9sDlj0OkdHvbHuDeQ== X-Received: by 2002:a17:903:228d:b0:1b9:d2fc:ba9f with SMTP id b13-20020a170903228d00b001b9d2fcba9fmr10196733plh.11.1689171240192; Wed, 12 Jul 2023 07:14:00 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id x22-20020a170902821600b001b8a897cd26sm3966667pln.195.2023.07.12.07.13.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jul 2023 07:13:59 -0700 (PDT) Message-ID: <52abca97-9102-5b2f-3b7b-2f55e10306b5@gmail.com> Date: Wed, 12 Jul 2023 08:13:58 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2] Implement new RTL optimizations pass: fold-mem-offsets. Content-Language: en-US To: Manolis Tsamis , Hans-Peter Nilsson Cc: gcc-patches@gcc.gnu.org, Richard Biener , Philipp Tomsich References: <20230615172817.3587006-1-manolis.tsamis@vrull.eu> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 7/12/23 03:12, Manolis Tsamis wrote: > On Mon, Jul 10, 2023 at 12:58 AM 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 calculations >>>> by moving them from add immediate instructions to the memory loads/stores. >> >>> 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? If the offset crosses an architectural size boundary such that the instruction was longer, but still valid, it could affect the cost. That's the most obvious case to me. There may be others. Any progress on that m68k issue? I've also got a report of x264 failing to build on riscv64 with the V2 variant, but I haven't distilled that down to a testcase yet. jeff