[Mlir-commits] [mlir] [mlir][LLVM] Add nsw and nuw flags (PR #74508)

Tom Eccles llvmlistbot at llvm.org
Wed Dec 6 04:15:58 PST 2023


================
@@ -62,14 +62,23 @@ static auto processFMFAttr(ArrayRef<NamedAttribute> attrs) {
   return filteredAttrs;
 }
 
+static auto processIntArithAttr(ArrayRef<NamedAttribute> attrs) {
+  SmallVector<NamedAttribute, 8> filteredAttrs(
+      llvm::make_filter_range(attrs, [&](NamedAttribute attr) {
+        return attr.getName() != "arithFlags";
----------------
tblah wrote:

I agree this is much better, but it isn't actually a static method of the interface (although it is declared as such in tablegen). One needs a concrete operation type to get the attribute name. I will try casting the Operation argument to printLLVMOpAttrs to the interface to get a concrete instance.

Do you want me to also fix `processFMFAttr` while I am at it?

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


More information about the Mlir-commits mailing list