[Mlir-commits] [mlir] 544831a - [mlir] Drop unused arith conversion class (NFC)

Christian Ulmann llvmlistbot at llvm.org
Tue Feb 14 01:22:12 PST 2023


Author: Christian Ulmann
Date: 2023-02-14T10:21:47+01:00
New Revision: 544831ab9f3575e5c3a23ac9c324e2a801ff8436

URL: https://github.com/llvm/llvm-project/commit/544831ab9f3575e5c3a23ac9c324e2a801ff8436
DIFF: https://github.com/llvm/llvm-project/commit/544831ab9f3575e5c3a23ac9c324e2a801ff8436.diff

LOG: [mlir] Drop unused arith conversion class (NFC)

This commit removes an old helper class for fastmath attribute
conversion that is no longer used.

The last usage of this class was dropped in https://reviews.llvm.org/D137456.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D143912

Added: 
    

Modified: 
    mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h b/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
index f27f7bb5975ec..95b12b69153aa 100644
--- a/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
+++ b/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
@@ -50,28 +50,6 @@ class AttrConvertFastMathToLLVM {
 
   ArrayRef<NamedAttribute> getAttrs() const { return convertedAttr.getAttrs(); }
 
-private:
-  NamedAttrList convertedAttr;
-};
-
-// Attribute converter that populates a NamedAttrList by removing the fastmath
-// attribute from the source operation attributes. This may be useful for
-// target operations that do not require the fastmath attribute, or for targets
-// that do not yet support the LLVM fastmath attribute.
-template <typename SourceOp, typename TargetOp>
-class AttrDropFastMath {
-public:
-  AttrDropFastMath(SourceOp srcOp) {
-    // Copy the source attributes.
-    convertedAttr = NamedAttrList{srcOp->getAttrs()};
-    // Get the name of the arith fastmath attribute.
-    llvm::StringRef arithFMFAttrName = SourceOp::getFastMathAttrName();
-    // Remove the source fastmath attribute.
-    convertedAttr.erase(arithFMFAttrName);
-  }
-
-  ArrayRef<NamedAttribute> getAttrs() const { return convertedAttr.getAttrs(); }
-
 private:
   NamedAttrList convertedAttr;
 };


        


More information about the Mlir-commits mailing list