diff --git a/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp b/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp --- a/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp +++ b/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp @@ -26,10 +26,6 @@ using TypePredicate = llvm::function_ref; -static bool isF32(Type type) { return type.isF32(); } - -static bool isI32(Type type) { return type.isInteger(32); } - // Returns vector width if the element type is matching the predicate (scalars // that do match the predicate have width equal to `1`). static Optional vectorWidth(Type type, TypePredicate pred) { @@ -54,11 +50,17 @@ } // Returns vector element type. If the type is a scalar returns the argument. -static Type elementType(Type type) { +LLVM_ATTRIBUTE_UNUSED static Type elementType(Type type) { auto vectorType = type.dyn_cast(); return vectorType ? vectorType.getElementType() : type; } +LLVM_ATTRIBUTE_UNUSED static bool isF32(Type type) { return type.isF32(); } + +LLVM_ATTRIBUTE_UNUSED static bool isI32(Type type) { + return type.isInteger(32); +} + //----------------------------------------------------------------------------// // Broadcast scalar types and values into vector types and values. //----------------------------------------------------------------------------//