LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
authorEli Friedman <eli.friedman@gmail.com>
Thu, 28 Jul 2011 21:48:00 +0000 (21:48 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 28 Jul 2011 21:48:00 +0000 (21:48 +0000)
commitff03048c1350fcc4fda1ef6d6c57252f3a950854
treeb2acebff9cd7d5210b5f461d00ceb7d95db32550
parent7f1cce55b5da7ef53269426e3c64586177384dca
LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.

The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.

As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible.  I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.

Optimizer/codegen support coming soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
docs/LangRef.html
include/llvm-c/Core.h
include/llvm/Bitcode/LLVMBitCodes.h
include/llvm/Instruction.def
include/llvm/Instructions.h
include/llvm/Support/InstVisitor.h
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/AsmParser/LLToken.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
lib/VMCore/AsmWriter.cpp
lib/VMCore/Instruction.cpp
lib/VMCore/Instructions.cpp
lib/VMCore/Verifier.cpp