[PATCH] D18201: Switch over targets to use AtomicExpandPass, and clean up target atomics code.

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 20:48:14 PDT 2018


asb added a comment.
Herald added subscribers: atanasyan, fedor.sergeev, kbarton, aheejin, kristof.beyls, jgravelle-google, arichardson, sbc100, nemanjai, sdardis, dschuff.
Herald added a reviewer: javed.absar.
Herald added a reviewer: jfb.

Are there any plans to push this forwards?

In current LLVM, MaxAtomicSizeInBitsSupported defaults to 1024, contrary to the documentation. Since its addition in April 2016, a comment is included indicating this will be fixed in the next commit:

  // TODO: the default will be switched to 0 in the next commit, along
  // with the Target-specific changes necessary.
  MaxAtomicSizeInBitsSupported = 1024;

Adjusting that comment and documenting the 1024 default in docs/Atomics.rst is an easy fix of course. At this point, is that the best next step? Or would it be worth adjusting the default MaxAtomicSizeInBitsSupported even without the rest of this patch? Affected in-tree targets can obviously just get a new setMaxAtomicSizeInBitsSupported(1024) call to preserve the previous behaviour, but this may trip up out-of-tree backends for little gain vs just fixing the docs.


https://reviews.llvm.org/D18201





More information about the llvm-commits mailing list