36template <
typename AtomicOpTy,
typename ExpectedElementType>
39 auto elementType = ptrType.getPointeeType();
40 if (!llvm::isa<ExpectedElementType>(elementType))
41 return op->
emitOpError() <<
"pointer operand must point to an "
43 <<
" value, found " << elementType;
45 StringAttr semanticsAttrName =
46 AtomicOpTy::getSemanticsAttrName(op->
getName());
47 auto memorySemantics =
48 op->
getAttrOfType<spirv::MemorySemanticsAttr>(semanticsAttrName)
60LogicalResult AtomicAndOp::verify() {
68LogicalResult AtomicIAddOp::verify() {
76LogicalResult EXTAtomicFAddOp::verify() {
84LogicalResult AtomicIDecrementOp::verify() {
92LogicalResult AtomicIIncrementOp::verify() {
100LogicalResult AtomicISubOp::verify() {
108LogicalResult AtomicOrOp::verify() {
116LogicalResult AtomicSMaxOp::verify() {
124LogicalResult AtomicSMinOp::verify() {
132LogicalResult AtomicUMaxOp::verify() {
140LogicalResult AtomicUMinOp::verify() {
148LogicalResult AtomicXorOp::verify() {
Operation is the basic unit of execution within MLIR.
Value getOperand(unsigned idx)
AttrClass getAttrOfType(StringAttr name)
OperationName getName()
The name of an operation is the key identifier for it.
InFlightDiagnostic emitOpError(const Twine &message={})
Emit an error with the op name prefixed, like "'dim' op " which is convenient for verifiers.
Type getType() const
Return the type of this value.
static StringRef stringifyTypeName()
LogicalResult verifyMemorySemantics(Operation *op, spirv::MemorySemantics memorySemantics)
StringRef stringifyTypeName< FloatType >()
StringRef stringifyTypeName< IntegerType >()
static LogicalResult verifyAtomicUpdateOp(Operation *op)