summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorRobin Morisset <morisset@google.com>2014-09-17 00:06:58 +0000
committerRobin Morisset <morisset@google.com>2014-09-17 00:06:58 +0000
commit25c8e318e43682042d0b41a44877afe69753dfc9 (patch)
treecaee971ed4df820846f3ddea4a0fd9624e01c4ca /llvm/lib/Target/ARM/ARMISelLowering.cpp
parent6389a7da088e58694cccaf29f9c361028a0f4dd8 (diff)
downloadbcm5719-llvm-25c8e318e43682042d0b41a44877afe69753dfc9.tar.gz
bcm5719-llvm-25c8e318e43682042d0b41a44877afe69753dfc9.zip
[X86] Use the generic AtomicExpandPass instead of X86AtomicExpandPass
This required a new hook called hasLoadLinkedStoreConditional to know whether to expand atomics to LL/SC (ARM, AArch64, in a future patch Power) or to CmpXchg (X86). Apart from that, the new code in AtomicExpandPass is mostly moved from X86AtomicExpandPass. The main result of this patch is to get rid of that pass, which had lots of code duplicated with AtomicExpandPass. llvm-svn: 217928
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 2d445aa8bac..4195b3bf0a4 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -10982,6 +10982,8 @@ bool ARMTargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
return true;
}
+bool ARMTargetLowering::hasLoadLinkedStoreConditional() const { return true; }
+
static void makeDMB(IRBuilder<> &Builder, ARM_MB::MemBOpt Domain) {
Module *M = Builder.GetInsertBlock()->getParent()->getParent();
Function *DMB = llvm::Intrinsic::getDeclaration(M, Intrinsic::arm_dmb);
OpenPOWER on IntegriCloud