This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add `populateFunctionOpInterfaceTypeConversionPattern` version which operates on any `FunctionOpInterface`
ClosedPublic

Authored by Hardcode84 on Nov 4 2022, 3:30 PM.

Details

Summary

Exisitng version is always limited to some specific op.

Diff Detail

Event Timeline

Hardcode84 created this revision.Nov 4 2022, 3:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2022, 3:30 PM
Hardcode84 requested review of this revision.Nov 4 2022, 3:30 PM

Do we still need a version operating on some specific op? If no, I can remove it completely.

rriddle accepted this revision.Nov 4 2022, 4:08 PM

Do we still need a version operating on some specific op? If no, I can remove it completely.

I would say yes (at least for now). I would only expect people to use the interface variant if they might actually have multiple types of functions (where they want all to be converted).

mlir/lib/Transforms/Utils/DialectConversion.cpp
3101–3118

Can we share the implementation here? It's a bit sad to duplicate.

This revision is now accepted and ready to land.Nov 4 2022, 4:08 PM
Hardcode84 updated this revision to Diff 473374.Nov 4 2022, 4:38 PM

remove copypaste