Index: src/IceIntrinsics.h |
diff --git a/src/IceIntrinsics.h b/src/IceIntrinsics.h |
index fb066b982b66a92ac0f5b34f50c44851f81d5786..74702c2cfd08cb32fcfbdd9fee0b28e60594ad9d 100644 |
--- a/src/IceIntrinsics.h |
+++ b/src/IceIntrinsics.h |
@@ -91,7 +91,14 @@ public: |
MemoryOrderNum // Invalid, keep last. |
}; |
- static bool VerifyMemoryOrder(uint64_t Order); |
+ // Verify memory ordering rules for atomic intrinsics. For |
+ // AtomicCmpxchg, Order is the "success" ordering and OrderOther is |
+ // the "failure" ordering. Returns true if valid, false if invalid. |
+ // TODO(stichnot,kschimpf): Perform memory order validation in the |
+ // bitcode reader/parser, allowing LLVM and Subzero to share. See |
+ // https://code.google.com/p/nativeclient/issues/detail?id=4126 . |
+ static bool isMemoryOrderValid(IntrinsicID ID, uint64_t Order, |
+ uint64_t OrderOther = MemoryOrderInvalid); |
enum SideEffects { SideEffects_F = 0, SideEffects_T = 1 }; |