Skip to content

Conversation

@sdasgup3
Copy link
Contributor

@sdasgup3 sdasgup3 commented Jan 3, 2025

StripFuncQuantTypes::isLegalType is unused and can be safely removed.

@llvmbot
Copy link
Member

llvmbot commented Jan 3, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-quant

Author: Sandeep Dasgupta (sdasgup3)

Changes

StripFuncQuantTypes::isLegalType is unused and can be safely removed.


Full diff: https://github.com/llvm/llvm-project/pull/121594.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Quant/Transforms/StripFuncQuantTypes.cpp (-8)
diff --git a/mlir/lib/Dialect/Quant/Transforms/StripFuncQuantTypes.cpp b/mlir/lib/Dialect/Quant/Transforms/StripFuncQuantTypes.cpp
index 71b88d1be1b05b..02384de27ab5e6 100644
--- a/mlir/lib/Dialect/Quant/Transforms/StripFuncQuantTypes.cpp
+++ b/mlir/lib/Dialect/Quant/Transforms/StripFuncQuantTypes.cpp
@@ -65,14 +65,6 @@ class QuantizedTypeConverter : public TypeConverter {
 class StripFuncQuantTypes
     : public impl::StripFuncQuantTypesBase<StripFuncQuantTypes> {
 
-  // Return whether a type is considered legal when occurring in the header of
-  // a function or as an operand to a 'return' op.
-  static bool isLegalType(Type type) {
-    if (auto tensorType = dyn_cast<TensorType>(type))
-      return isLegalType(tensorType.getElementType());
-    return !isa<quant::QuantizedType>(type);
-  }
-
 public:
   void runOnOperation() override {
 

@sdasgup3
Copy link
Contributor Author

@rafaelubalmw Can you please take a look at this?

@sdasgup3 sdasgup3 requested a review from sjarus March 24, 2025 19:21
@GleasonK
Copy link
Contributor

Agree this seems unused. Will give a few days for others to see before merging.

@GleasonK GleasonK merged commit b46c602 into llvm:main Mar 31, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants