llvm-6502/lib/IR
Tim Northover 8f2a85e099 IR: add "cmpxchg weak" variant to support permitted failure.
This commit adds a weak variant of the cmpxchg operation, as described
in C++11. A cmpxchg instruction with this modifier is permitted to
fail to store, even if the comparison indicated it should.

As a result, cmpxchg instructions must return a flag indicating
success in addition to their original iN value loaded. Thus, for
uniformity *all* cmpxchg instructions now return "{ iN, i1 }". The
second flag is 1 when the store succeeded.

At the DAG level, a new ATOMIC_CMP_SWAP_WITH_SUCCESS node has been
added as the natural representation for the new cmpxchg instructions.
It is a strong cmpxchg.

By default this gets Expanded to the existing ATOMIC_CMP_SWAP during
Legalization, so existing backends should see no change in behaviour.
If they wish to deal with the enhanced node instead, they can call
setOperationAction on it. Beware: as a node with 2 results, it cannot
be selected from TableGen.

Currently, no use is made of the extra information provided in this
patch. Test updates are almost entirely adapting the input IR to the
new scheme.

Summary for out of tree users:
------------------------------

+ Legacy Bitcode files are upgraded during read.
+ Legacy assembly IR files will be invalid.
+ Front-ends must adapt to different type for "cmpxchg".
+ Backends should be unaffected by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-13 14:24:07 +00:00
..
AsmWriter.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
AsmWriter.h
AttributeImpl.h
Attributes.cpp Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute. 2014-06-05 19:29:43 +00:00
AutoUpgrade.cpp
BasicBlock.cpp
CMakeLists.txt
ConstantFold.cpp
ConstantFold.h
ConstantRange.cpp
Constants.cpp
ConstantsContext.h
Core.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
DataLayout.cpp
DebugInfo.cpp
DebugLoc.cpp Add missing const specifier to a const method. 2014-06-05 14:32:15 +00:00
DiagnosticInfo.cpp
DiagnosticPrinter.cpp
DIBuilder.cpp
Dominators.cpp
Function.cpp
GCOV.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
Globals.cpp Fix gcc -Wparentheses warning. 2014-06-04 11:21:11 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
Instructions.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
IntrinsicInst.cpp
IRBuilder.cpp
IRPrintingPasses.cpp
LeakDetector.cpp
LeaksContext.h
LegacyPassManager.cpp
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp
LLVMContextImpl.h
Makefile
Mangler.cpp
MDBuilder.cpp
Metadata.cpp
Module.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
module.modulemap
Pass.cpp Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassManager.cpp
PassRegistry.cpp Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
SymbolTableListTraitsImpl.h
Type.cpp
TypeFinder.cpp
Use.cpp
User.cpp
Value.cpp Convert StringMapEntry::Create to use StringRef instead of start/end pointers. Simpliies all in tree call sites. No functional change. 2014-06-11 05:35:56 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp
Verifier.cpp Fix verifier for GlobalAliases to avoid recursing into global initializers. 2014-06-12 01:46:54 +00:00