[llvm-commits] [llvm] r141333 - in /llvm/trunk: include/llvm/Intrinsics.td lib/Analysis/BasicAliasAnalysis.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h lib/Target/CBackend/CBackend.cpp lib/Transforms/Scalar/LowerAtomic.cpp lib/VMCore/AutoUpgrade.cpp
Duncan Sands
baldrick at free.fr
Fri Oct 7 00:34:05 PDT 2011
Hi Eli,
> --- llvm/trunk/lib/VMCore/AutoUpgrade.cpp (original)
> +++ llvm/trunk/lib/VMCore/AutoUpgrade.cpp Thu Oct 6 18:20:49 2011
> @@ -206,6 +223,80 @@
>
> // Remove intrinsic.
> CI->eraseFromParent();
> + } else if (F->getName().startswith("llvm.atomic.cmp.swap")) {
> + IRBuilder<> Builder(C);
> + Builder.SetInsertPoint(CI->getParent(), CI);
> + Value *Val = Builder.CreateAtomicCmpXchg(CI->getArgOperand(0),
> + CI->getArgOperand(1),
> + CI->getArgOperand(2),
> + Monotonic);
in your llvm-gcc patch llvm.atomic.cmp.swap was replaced with
CreateAtomicCmpXchg with SequentiallyConsistent, but here you replace with
Monotonic. Why the difference? Is it because the gcc builtins have an
implicit memory barrier?
Thanks, Duncan.
More information about the llvm-commits
mailing list