[LLVMdev] Atomic operations: minimal or maximal?
andrewl at lenharth.org
Mon Mar 3 13:46:28 PST 2008
On 3/3/08, Chris Lattner <sabre at nondot.org> wrote:
> On Mon, 3 Mar 2008, Andrew Lenharth wrote:
> > we have a large set of atomic ops that most platforms support natively
> > and the couple that don't can easily lower, or have a minimal set and
> > try to raise the lowered gcc atomic ops to efficient code on archs
> > that support ll/sc (essentially trying to recognize the ld, op, CAS
> > loops during codegen).
> I'd suggest starting with a minimal set. It's easier to add things lazily
> as needed than it is to take things out that end up not being needed.
Right, that is what is done. And they are sufficient, just not easy
to make efficient. But I mostly agree and we can wait until the PPC
people complain that their locks are too slow.
More information about the llvm-dev