[PATCH] Implement emitLeading/TrailingFence in the ARM backend

Tim Northover t.p.northover at gmail.com
Wed Sep 3 06:53:57 PDT 2014

Hi Robin,

Sorry, this got lost over my holiday. I think it's mostly fine now. Just one very minor style point and a possibly misleading comment.



Comment at: lib/Target/ARM/ARMISelLowering.cpp:11001
@@ -11000,1 +11000,3 @@
+static void MakeDMB(IRBuilder<> &Builder, ARM_MB::MemBOpt Domain) {
+  Module *M = Builder.GetInsertBlock()->getParent()->getParent();
Should probably be "makeDMB", for LLVM style.

Comment at: lib/Target/ARM/ARMISelLowering.cpp:11052-11053
@@ +11051,4 @@
+    case AcquireRelease:
+      // FIXME: Too conservative, an isb after a dependent branch is enough
+      // See http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html, confirmed in
+      // http://www0.cs.ucl.ac.uk/staff/j.alglave/papers/toplas14.pdf page 36,
By my tests, an ISB is even heavier than a DMB, so we probably don't want to encourage this alternative. I'd just skip the comment entirely.


More information about the llvm-commits mailing list