[PATCH] Use target-dependent emitLeading/TrailingFence instead of the target-independent insertLeading/TrailingFence (in AtomicExpandPass)

JF Bastien jfb at chromium.org
Wed Aug 20 22:11:49 PDT 2014


I'd very much like @t.p.northover's input, especially on the swift parts.

================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:110
@@ +109,3 @@
+  // before SequentiallyConsistent loads on Power. So we let the target choose what to
+  // emit.
+  TM->getSubtargetImpl()->getTargetLowering()->emitLeadingFence(Builder,
----------------
Are there public references for this? Also, which versions of ARM and POWER?

================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:111
@@ +110,3 @@
+  // emit.
+  TM->getSubtargetImpl()->getTargetLowering()->emitLeadingFence(Builder,
+          LI->getOrdering(), /*IsStore=*/false, /*IsLoad=*/true);
----------------
Constant-fold `TM->getSubtargetImpl()->getTargetLowering()->` in this function (same for other functions below).

================
Comment at: test/Transforms/AtomicExpand/ARM/lit.local.cfg:3
@@ -2,2 +2,1 @@
     config.unsupported = True
-
----------------
Undo this change.

http://reviews.llvm.org/D4961






More information about the llvm-commits mailing list