[mlir][PDL] Infer result types from a `replace` as the last resort
authorRiver Riddle <riddleriver@gmail.com>
Thu, 1 Sep 2022 17:36:00 +0000 (10:36 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Thu, 8 Sep 2022 18:35:31 +0000 (11:35 -0700)
commitb69f10f5a118ec6efe5edfae2deb376b53877170
tree4b8606185f51d4cba367f420668ddb38857383ef
parentf92c1726deb729d96b9e527e2f4f329f1da09fdf
[mlir][PDL] Infer result types from a `replace` as the last resort

This prevents situations where explicit results types were provided,
which have different types than the operation being replaced. This
is useful for supporting dialect conversion, which will have proper
support added in a followup.

Differential Revision: https://reviews.llvm.org/D133141
mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-rewriter.mlir