Skip to content

Conversation

@makslevental
Copy link
Contributor

This is dead code (no impls or uses anywhere in the code base) that causes linker errors in some build configurations.

This is dead code (no impls or uses anywhere in the code base) that causes linker errors in some build configurations.
@makslevental makslevental changed the title [mlir][arith] DCE getPredicateByName [mlir][arith] DCE getPredicateByName Dec 26, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 26, 2024

@llvm/pr-subscribers-mlir-arith

@llvm/pr-subscribers-mlir

Author: Maksim Levental (makslevental)

Changes

This is dead code (no impls or uses anywhere in the code base) that causes linker errors in some build configurations.


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

1 Files Affected:

  • (modified) mlir/include/mlir/Dialect/Arith/IR/ArithOps.td (-8)
diff --git a/mlir/include/mlir/Dialect/Arith/IR/ArithOps.td b/mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
index 2f71caaa593a6c..0722ff68d890de 100644
--- a/mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
+++ b/mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
@@ -1499,10 +1499,6 @@ def Arith_CmpIOp
                        SignlessIntegerLikeOfAnyRank:$lhs,
                        SignlessIntegerLikeOfAnyRank:$rhs);
 
-  let extraClassDeclaration = [{
-    static arith::CmpIPredicate getPredicateByName(StringRef name);
-  }];
-
   let hasFolder = 1;
   let hasCanonicalizer = 1;
 }
@@ -1546,10 +1542,6 @@ def Arith_CmpFOp : Arith_CompareOp<"cmpf",
                        DefaultValuedAttr<
                          Arith_FastMathAttr, "::mlir::arith::FastMathFlags::none">:$fastmath);
 
-  let extraClassDeclaration = [{
-    static arith::CmpFPredicate getPredicateByName(StringRef name);
-  }];
-
   let hasFolder = 1;
   let hasCanonicalizer = 1;
   let assemblyFormat = [{ $predicate `,` $lhs `,` $rhs (`fastmath` `` $fastmath^)?

Copy link
Member

@Groverkss Groverkss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, probably a debug function, but it shouldnt be part of the operation's definition even if so.

@makslevental makslevental merged commit 6b53a95 into llvm:main Dec 27, 2024
11 checks passed
@makslevental makslevental deleted the makslevental/arith-getPredicateByName branch December 27, 2024 01:38
@ftynse
Copy link
Member

ftynse commented Dec 27, 2024

I think this was rather a remnant of the old parsing strategy where we parsed the predicate as a string attribute before converting.

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.

4 participants