[Mlir-commits] [mlir] [mlir] Add `arith-int-range-narrowing` pass (PR #112404)
Jakub Kuderski
llvmlistbot at llvm.org
Sun Nov 3 19:25:42 PST 2024
================
@@ -190,8 +195,263 @@ struct DeleteTrivialRem : public OpRewritePattern<RemOp> {
DataFlowSolver &solver;
};
-struct IntRangeOptimizationsPass
- : public arith::impl::ArithIntRangeOptsBase<IntRangeOptimizationsPass> {
+/// Check if `type` is index or integer type with `getWidth() > targetBitwidth`.
+static bool checkIntType(Type type, unsigned targetBitwidth) {
----------------
kuhar wrote:
I still think this should return `LogicalResult`. With `bool`, it's not obvious what the meaning of `true`/`false` is.
https://github.com/llvm/llvm-project/pull/112404
More information about the Mlir-commits
mailing list