[Mlir-commits] [mlir] [mlir][IR] Add `isFloat()` and clean code (PR #112897)

Mehdi Amini llvmlistbot at llvm.org
Mon Oct 21 16:41:16 PDT 2024


================
@@ -63,6 +63,8 @@ bool Type::isF128() const { return llvm::isa<Float128Type>(*this); }
 
 bool Type::isIndex() const { return llvm::isa<IndexType>(*this); }
 
+bool Type::isFloat() const { return llvm::isa<FloatType>(*this); }
+
----------------
joker-eph wrote:

This can be seen as fitting here for consistency, however I wonder if the desirable thing wouldn't instead be to remove all the other `isXXXX` from the generic `Type` class?

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


More information about the Mlir-commits mailing list