[PATCH] Add AtomicExpandPass::bracketInstWithFences, and use it whenever getInsertFencesForAtomic would trigger in SelectionDAGBuilder
JF Bastien
jfb at chromium.org
Tue Sep 23 13:30:41 PDT 2014
Looks good.
================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:168
@@ -119,1 +167,3 @@
+ // sizes than normal loads. For example, the only 64-bit load guaranteed
+ // to be single-copy atomic by ARM is an ldrexd (A3.5.3).
Value *Val =
----------------
morisset wrote:
> jfb wrote:
> > That reminds me: ARM guarantees that `ldrd` and `strd` are atomic if the CPU has LPAE (e.g. A15 has that guarantee, see DDI0406C ARM architecture reference manual, sections A8.8.72-74 LDRD). Could you add this to your list of things to implement (emit `ldrd`/`strd` when appropriate)?
> I just commited a FIXME to that effect in r218326.
Thanks!
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:11052
@@ -11052,2 +11051,3 @@
}
+ llvm_unreachable("Unknown fence ordering in emitLeadingFence");
}
----------------
rnk wrote:
> jfb wrote:
> > Fold this into the `default` case for the `switch`.
> We can't do this because MSVC will warn about falling off the end of the function.
Grumble grumble MSVC.
http://reviews.llvm.org/D5179
More information about the llvm-commits
mailing list