[Mlir-commits] [mlir] [mlir] Migrate users to explicitly discardable/inherent attribute APIs (PR #217233)

Igor Wodiany llvmlistbot at llvm.org
Wed Aug 19 02:55:58 PDT 2026


================
@@ -42,11 +42,7 @@ static LogicalResult verifyAtomicUpdateOp(Operation *op) {
                              << stringifyTypeName<ExpectedElementType>()
                              << " value, found " << elementType;
 
-  StringAttr semanticsAttrName =
-      AtomicOpTy::getSemanticsAttrName(op->getName());
-  auto memorySemantics =
-      op->getAttrOfType<spirv::MemorySemanticsAttr>(semanticsAttrName)
-          .getValue();
+  auto memorySemantics = cast<AtomicOpTy>(op).getSemantics();
----------------
IgWod wrote:

nit: Please spell out the type

https://github.com/llvm/llvm-project/pull/217233


More information about the Mlir-commits mailing list