[llvm] [XCore] Set MaxAtomicSizeInBitsSupported to 0 (PR #74389)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 09:50:02 PST 2023


jyknight wrote:

> within the max bits, we are expected to support all five atomic instructions

Correct: if native lockless implementations for all 5 operations aren't available for a given size, then it's required to fallback to the __atomic_* library routine for all of them. The library may use a lock-based implementation, and unless all the operations go through the library, it isn't possible to guarantee that e.g. cmpxchg vs store are atomic.

> Just to mention, while looking at this, I noticed that TargetLoweringBase.cpp has the comment that the default will be set to 0 - just wondered if that's still the case.

Yes, that was a migration I started, then dropped on the floor for ... a few years, sorry. This is me picking that back up. First step is to fix all in-tree targets explicitly, and will change the default afterwards.

https://github.com/llvm/llvm-project/pull/74389


More information about the llvm-commits mailing list