Index: include/llvm/IR/Instructions.h =================================================================== --- include/llvm/IR/Instructions.h +++ include/llvm/IR/Instructions.h @@ -236,6 +236,12 @@ bool isUnordered() const { return getOrdering() <= Unordered && !isVolatile(); } + bool isAtLeastAcquire() const { + // We do not have to check for AcquireRelease as this is a load and + // it is not a valid ordering for loads. + return (getOrdering() == Acquire + || getOrdering() == SequentiallyConsistent); + } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } @@ -356,6 +362,12 @@ bool isUnordered() const { return getOrdering() <= Unordered && !isVolatile(); } + bool isAtLeastRelease() const { + // We do not have to check for AcquireRelease as this is a store and + // it is not a valid ordering for stores. + return (getOrdering() == Release + || getOrdering() == SequentiallyConsistent); + } Value *getValueOperand() { return getOperand(0); } const Value *getValueOperand() const { return getOperand(0); }