[PATCH 0/5] arm64: atomics: cleanups and codegen improvements

Catalin Marinas catalin.marinas at arm.com
Tue Dec 14 08:54:43 PST 2021


On Fri, 10 Dec 2021 15:14:05 +0000, Mark Rutland wrote:
> While looking at Peter's recent refcount rework, I spotted that we have
> some unfortunate code generation for the LSE atomics. Due to a
> combination of assembly constraints and manipulation performed in
> assembly which the compiler has no visibilty of, the compiler ends up
> generating unnecessary register shuffling and redundant manipulation.
> 
> This series (based on v5.16-rc4) attempts to improve this by improving
> the constraints, and moving value manipulation to C where the compiler
> can perofrm a number of optimizations. This also has the benefit of
> simplifying the implementation and deleting 100+ lines of code.
> 
> [...]

Applied to arm64 (for-next/atomics), thanks! (also fixed the double
"instruction" in the last patch).

[1/5] arm64: atomics: format whitespace consistently
      https://git.kernel.org/arm64/c/8e6082e94aac
[2/5] arm64: atomics lse: define SUBs in terms of ADDs
      https://git.kernel.org/arm64/c/ef5324506098
[3/5] arm64: atomics: lse: define ANDs in terms of ANDNOTs
      https://git.kernel.org/arm64/c/5e9e43c987b2
[4/5] arm64: atomics: lse: improve constraints for simple ops
      https://git.kernel.org/arm64/c/8a578a759ad6
[5/5] arm64: atomics: lse: define RETURN ops in terms of FETCH ops
      https://git.kernel.org/arm64/c/053f58bab331

-- 
Catalin




More information about the linux-arm-kernel mailing list