[LLVMdev] RFC: Atomics.h
Owen Anderson
resistor at mac.com
Sun May 17 13:20:02 PDT 2009
On May 17, 2009, at 12:32 PM, Chris Lattner wrote:
> Owen, I would really rather that you didn't take this path. Threading
> support in LLVM should always be optional: it should be possible to
> use LLVM on systems where we don't have support for threading
> operations. Indeed, some systems don't support threads!
I'm not trying to make it required. I had provided threads-disabled
versions of all the operations.
> Given that, I think it makes sense to start out the atomics
> operations very simple: just make them work for compilers that support
> GCC 4.2's atomics. Since things will be changing quickly initially,
> this makes it easy to prototype and build things out, and this also
> avoids pulling in an external library with a (compatible but)
> different license.
>
> In practice, I think a huge chunk of the community will be served when
> LLVM supports GCC 4.2 atomics + a windows implementation. I don't see
> a reason to make things any more complex than that. Since llvm-gcc
> supports atomics, someone doing development on a supported
> architecture can just build llvm-gcc single threaded, which provides
> them with a compiler that supports atomics on their platform.
After thinking about this some more, I think you're right. Trying to
support every platform anyone cares about is rapidly becoming a
nightmare. Setting GCC4.2 as a baseline requirement (and presumably
providing a Windows implementation as well) is probably a good way to
get this back to a sane amount of stuff to support.
--Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090517/94b7c3c0/attachment.bin>
More information about the llvm-dev
mailing list