forked from OSchip/llvm-project
420a216817
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. llvm-svn: 210903 |
||
---|---|---|
.. | ||
2006-12-11-Cast-ConstExpr.ll | ||
2009-06-11-FirstClassAggregateConstant.ll | ||
aggregateInstructions.3.2.ll | ||
aggregateInstructions.3.2.ll.bc | ||
arm32_neon_vcnt_upgrade.ll | ||
atomic.ll | ||
attributes-3.3.ll | ||
attributes-3.3.ll.bc | ||
attributes.ll | ||
binaryFloatInstructions.3.2.ll | ||
binaryFloatInstructions.3.2.ll.bc | ||
binaryIntInstructions.3.2.ll | ||
binaryIntInstructions.3.2.ll.bc | ||
bitwiseInstructions.3.2.ll | ||
bitwiseInstructions.3.2.ll.bc | ||
blockaddress.ll | ||
calling-conventions.3.2.ll | ||
calling-conventions.3.2.ll.bc | ||
case-ranges-3.3.ll | ||
case-ranges-3.3.ll.bc | ||
cmpxchg-upgrade.ll | ||
cmpxchg-upgrade.ll.bc | ||
conversionInstructions.3.2.ll | ||
conversionInstructions.3.2.ll.bc | ||
deprecated-linker_private-linker_private_weak.ll | ||
drop-debug-info.ll | ||
extractelement.ll | ||
flags.ll | ||
function-encoding-rel-operands.ll | ||
global-variables.3.2.ll | ||
global-variables.3.2.ll.bc | ||
invalid.ll | ||
invalid.ll.bc | ||
linkage-types-3.2.ll | ||
linkage-types-3.2.ll.bc | ||
local-linkage-default-visibility.3.4.ll | ||
local-linkage-default-visibility.3.4.ll.bc | ||
memInstructions.3.2.ll | ||
memInstructions.3.2.ll.bc | ||
metadata-2.ll | ||
metadata.ll | ||
miscInstructions.3.2.ll | ||
miscInstructions.3.2.ll.bc | ||
null-type.ll | ||
null-type.ll.bc | ||
old-aliases.ll | ||
old-aliases.ll.bc | ||
pr18704.ll | ||
pr18704.ll.bc | ||
ptest-new.ll | ||
ptest-old.ll | ||
select.ll | ||
shuffle.ll | ||
ssse3_palignr.ll | ||
tailcall.ll | ||
terminatorInstructions.3.2.ll | ||
terminatorInstructions.3.2.ll.bc | ||
upgrade-global-ctors.ll | ||
upgrade-global-ctors.ll.bc | ||
upgrade-tbaa.ll | ||
variableArgumentIntrinsic.3.2.ll | ||
variableArgumentIntrinsic.3.2.ll.bc | ||
vectorInstructions.3.2.ll | ||
vectorInstructions.3.2.ll.bc | ||
visibility-styles.3.2.ll | ||
visibility-styles.3.2.ll.bc | ||
weak-cmpxchg-upgrade.ll | ||
weak-cmpxchg-upgrade.ll.bc |