Closed dcaballe closed 5 years ago
I would expand the description a bit because it doesn't quite capture the real use case, I believe. It should mention that this is for M->N->1
conversions where you want the remapped values of M which aren't necessarily present/accessible in the replacement of N.
Also, can you add a simple test in the TestDialect if possible?
I addressed the feedback and implemented a simple test that exercises getRemappedValue by using an existing instruction in TestDialect and adding a dummy test pass. I also reworded the PR description but I’m not sure I understand the M->M->1
in your comment so I used M->N
instead. Please, let me know if something else is needed.
ConversionPatternRewritter::getRemappedValue returns the remapped value of an original value that has been previously replaced using ConversionPatternRewritter. This mechanism allows the implementation of M->N conversions where we need to retrieve remapped values of M which aren't necessarily present/accessible in the replacement of N.