[PATCH] D75854: [mlir][ods] Fix AnyInteger predicate

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 10:14:09 PDT 2020


rriddle accepted this revision.
rriddle added inline comments.


================
Comment at: mlir/include/mlir/IR/OpBase.td:318
 // Any integer type irrespective of its width and signedness semantics.
-def AnyInteger : Type<CPred<"$_self.isInteger()">, "integer">;
+def AnyInteger : Type<CPred<"$_self.isa<IntegerType>()">, "integer">;
 
----------------
stephenneuendorffer wrote:
> To be symmetric with isSignlessInteger() and other functions, maybe adding isInteger() which does the isa<IntegerType> check is a good idea?
I explicitly removed all of the methods that can be easily checked with isa<>. They only serve as pass-through methods that bloat API surface area. The same methodology applies to methods placed on the Builder.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75854/new/

https://reviews.llvm.org/D75854





More information about the llvm-commits mailing list