> From: "Roger Sayle" <ro...@nextmovesoftware.com> > 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