From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id F0F2E3858CDB for ; Sat, 13 May 2023 00:56:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F0F2E3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1683939401; x=1715475401; h=from:to:cc:in-reply-to:subject:mime-version: content-transfer-encoding:references:message-id:date; bh=6h1WJnmRpijEKXJc517CS0JCP4Y2ChYp0NrqJewV5OE=; b=I47hsM7FIz++0LfcMbzkHJWcCpOfAhtlvpowvqMLIHVQO6UAmkcM+64f 9IL2DKKR6weigQ0eijfikwtCMdmTLSlJhvySGaYZXan1yV8xzPiBNQKMC EHHbboDl/eBTc7eI5GE2KD8IG7kkd1ujs0EpEurMheR7qkQ0VgMgH9AEd SaOdSrta/bh5G0C/q8KP0H7zFU9YKGWViss7bX1/OI7EUsvlXOH+gXD7O VEXSXn+8zQsS5GZ01cGyImL6uIoz8+L7DZiNTz9iOe1CqcGzZa88dn//t a/7ovdrmkIjZ1VSSxDy7s3J3HE059fkMtQCAb88YvXAZWYzXatCZ5iobT A==; From: Hans-Peter Nilsson To: Roger Sayle CC: , , , In-Reply-To: <009601d984da$9d4322e0$d7c968a0$@nextmovesoftware.com> (roger@nextmovesoftware.com) Subject: Re: [committed] Convert xstormy16 to LRA MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <009601d97c85$de708170$9b518450$@nextmovesoftware.com> <20230511150540.9606F20420@pchp3.se.axis.com> <20230512135349.A2F0F2040D@pchp3.se.axis.com> <009601d984da$9d4322e0$d7c968a0$@nextmovesoftware.com> Message-ID: <20230513005639.2E4FC203FA@pchp3.se.axis.com> Date: Sat, 13 May 2023 02:56:39 +0200 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,SPF_HELO_PASS,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: > From: "Roger Sayle" > Date: Fri, 12 May 2023 15:04:03 +0100 > Hi H-P, > This patch should now already be on trunk: > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d8a6945c6ea22efa4d5e42fe1922d2 > b27953c8cd > Many thanks to Jeff for the review/approval. > There have been no reported adverse effects so far. > Please let me/us know if this has helped CRIS. TL;DR: It sure helped for the big offender; arith-rand-ll with LRA is now 1.3% faster! Not everything is rosy though. It's not a complete win for CRIS with LRA, as other of my mini-regression tests (like, a trivial loop with 0<=i<=10 fprintf (f, "%s: %d\n", "Hello, world", i); with newlib), where it got 0.04% larger. On average though, 0.5% smaller. Actually, it's more accurate to state it in terms of the code that changed: newlib's _vfprintf_r improved slightly performance-wise on some paths (1 cycle per call), but regressed on others (7 cycles per call). It got 0.2% bigger. Libgcc's __moddi3 regressed slightly (1 cycle per 11 calls) but stayed the same size. The main function in arith-rand-ll (where I guess all small functions got inlined) improved 3% by size, performance as above. Those clobbers must have helped reload, because with reload there was a 0.15% performance regression for arith-rand-ll (and 0.2% by size because main got 1.6% larger) with this patch. But size was smaller or equal for all other tests using reload with this patch, if only by 0.04% on average. Or in other numbers: _vfprintf_r got 4 cycles faster per call on some paths and 2 on others. It got 0.05% bigger. A similar function, __vfiprintf_r, shrank by 0.5%. Go figure. For all but arith-rand-ll, this patch was a wash for reload. (Yes: the case with reload is now artificial; for that, I was using master before Jeff's commit and added my own commits since then, to keep track of my fight against LRA regressions; the current score is that code is still 0.34% slower and 0.17% larger with this applied just for LRA.) Can we ask Vladimir for a statement; perhaps LRA could just have handled those clobbers better (referring to the commit)? brgds, H-P