llvm-6502/lib/Transforms/IPO
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
..
ArgumentPromotion.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
BarrierNoopPass.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 09:10:37 +00:00
CMakeLists.txt Introduce a BarrierNoop pass, a hack designed to allow *some* control 2012-10-18 08:05:46 +00:00
ConstantMerge.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
DeadArgumentElimination.cpp Add a <tuple> include to more files that aren't getting it transitively on MSVC. 2014-04-30 07:21:01 +00:00
ExtractGV.cpp GlobalValue: Assert symbols with local linkage have default visibility 2014-05-07 23:00:22 +00:00
FunctionAttrs.cpp When analyzing params/args for readnone/readonly, don't forget to consider that a pointer argument may be passed through a callsite to the return, and that we may need to analyze it. Fixes a bug reported on llvm-dev: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/073098.html 2014-05-30 02:31:27 +00:00
GlobalDCE.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
GlobalOpt.cpp Fix most of PR10367. 2014-05-16 19:35:39 +00:00
InlineAlways.cpp Check the alwaysinline attribute on the call as well as on the caller. 2014-05-19 18:25:54 +00:00
Inliner.cpp Add support for missed and analysis optimization remarks. 2014-05-22 14:19:46 +00:00
InlineSimple.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
Internalize.cpp LTO: -internalize sets visibility to default 2014-05-05 17:40:44 +00:00
IPConstantPropagation.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
IPO.cpp Removing spurious dependency of IPO on JumpInstrTables 2014-06-05 19:43:57 +00:00
LLVMBuild.txt Prune redundant dependencies in LLVMBuild.txt. 2013-12-11 00:30:57 +00:00
LoopExtractor.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
Makefile
MergeFunctions.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
PartialInlining.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
PassManagerBuilder.cpp Add LoadCombine pass. 2014-05-29 01:55:07 +00:00
PruneEH.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
StripDeadPrototypes.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
StripSymbols.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00