[Mlir-commits] [mlir] replaces hardcoded attribute names in SPIRV dialect parsing code (PR #81552)

Mehdi Amini llvmlistbot at llvm.org
Mon Feb 12 16:13:07 PST 2024


================
@@ -42,8 +42,9 @@ static LogicalResult verifyAtomicUpdateOp(Operation *op) {
                              << stringifyTypeName<ExpectedElementType>()
                              << " value, found " << elementType;
 
+  StringRef semanticsAttrName = spirv::AtomicAndOp::getSemanticsAttrName(op->getName()).strref();
----------------
joker-eph wrote:

I don't quite get why you use StringRef here?
Can we stick to StringAttr instead? This will make it use pointer comparison instead of string comparisons.

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


More information about the Mlir-commits mailing list