[Mlir-commits] [mlir] [MLIR][Transforms] add eliminate-explicit-rounding pass (PR #93443)
Matthias Springer
llvmlistbot at llvm.org
Mon May 27 00:35:52 PDT 2024
================
@@ -57,7 +57,9 @@ void mlir::math::populateLegalizeToF32TypeConverter(
});
typeConverter.addTargetMaterialization(
[](OpBuilder &b, Type target, ValueRange input, Location loc) {
- return b.create<arith::ExtFOp>(loc, target, input);
+ auto extFOp = b.create<arith::ExtFOp>(loc, target, input);
+ extFOp->setAttr("eliminatable", b.getBoolAttr(true));
----------------
matthias-springer wrote:
Setting "discardable" attributes in one pass and checking for them in another pass is generally unsafe. Is there a way to do this without attributes? Maybe an option for the pass that inserts the ops?
https://github.com/llvm/llvm-project/pull/93443
More information about the Mlir-commits
mailing list