================
Comment at: lib/CodeGen/CGAtomic.cpp:281
@@ +280,3 @@
+    SI->addCase(CGF.Builder.getInt32(1), AcquireBB);
+    SI->addCase(CGF.Builder.getInt32(2), AcquireBB);
+  }
----------------
Wouldn't it be better to use AtomicOrderingKind here instead of the values? 
Same a few lines below, and around ~700.

================
Comment at: test/CodeGen/atomic-ops.c:346
@@ +345,3 @@
+  // CHECK-DAG: cmpxchg {{.*}} seq_cst acquire
+  // CHECK-DAG: cmpxchg {{.*}} seq_cst seq_cst
+}
----------------
Shouldn't you also check that the cases are correct here?

================
Comment at: lib/CodeGen/CGAtomic.cpp:269
@@ +268,3 @@
+
+  // Emit all the different atomics
+  CGF.Builder.SetInsertPoint(MonotonicBB);
----------------
I'd repeat the comment from below too:

  // MonotonicBB is arbitrarily chosen as the default case; in practice, this
  // doesn't matter unless someone is crazy enough to use something that
  // doesn't fold to a constant for the ordering.


http://llvm-reviews.chandlerc.com/D3053
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to