[PATCH] Add AtomicExpandPass::bracketInstWithFences, and use it whenever getInsertFencesForAtomic would trigger in SelectionDAGBuilder

Robin Morisset morisset at google.com
Tue Sep 23 11:44:09 PDT 2014


================
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 =
----------------
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.

http://reviews.llvm.org/D5179






More information about the llvm-commits mailing list