[PATCH] Erase fence insertion from SelectionDAGBuilder.cpp (NFC)
JF Bastien
jfb at chromium.org
Fri Oct 3 14:55:02 PDT 2014
I added @rkotler to the review for MIPS. I'm not sure if anyone on Sparc/XCore can comment. Overall this is NFC, so no big issue.
The change looks good overall.
================
Comment at: include/llvm/Target/TargetLowering.h:979
@@ +978,3 @@
+ /// *unsound* ! Fences cannot, in general, be used to restore sequential
+ /// consistency. For example, consider the following example:
+ /// atomic<int> x = y = 0;
----------------
The FIXME should probably say how to fix this (or maybe point it out in the code below), and then suggest that the asserts be added back.
================
Comment at: include/llvm/Target/TargetLowering.h:987
@@ -986,3 +1006,1 @@
- /// Instruction*. Even complex fence sequences can be represented by a
- /// single Instruction* through an intrinsic to be lowered later.
virtual Instruction* emitTrailingFence(IRBuilder<> &Builder, AtomicOrdering Ord,
----------------
You can create a doxygen group for these functions, start with `@{` in the comment for emitLeading, and after emitTrailing close with `}@`.
================
Comment at: test/CodeGen/XCore/atomic.ll:26
@@ -28,2 +25,3 @@
; CHECK-NEXT: ldaw r[[R1:[0-9]+]], dp[pool]
+; CHECK-NEXT: #MEMBARRIER
; CHECK-NEXT: ldc r[[R2:[0-9]+]], 0
----------------
Why does the barrier move?
http://reviews.llvm.org/D5474
More information about the llvm-commits
mailing list