[mlir][arith] Add arith.constant materialization helper
This adds `arith::ConstantOp::materialize`, which builds a constant from an attribute and type only if it would result in a valid op. This is useful for dialect `materializeConstant` hooks, and allows for removing the previous `Attribute, Type` builder which was only used during materialization. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D148491
Loading
Please sign in to comment