This is an archive of the discontinued LLVM Phabricator instance.

[mlir][func] Add support for nested tuples to TestDecomposeCallGraphTypes.
ClosedPublic

Authored by ingomueller-net on Feb 8 2023, 6:22 AM.

Details

Summary

Nested tuples were only supported in some narrow edge cases (and
potentially only because the test ops like test.make_tuple aren't
properly verified). This patch adds a couple of test cases with tested
tuple types and makes them work in the test pass by extending the
argument materialization and decomposition functions.

Diff Detail

Event Timeline

ingomueller-net created this revision.Feb 8 2023, 6:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 6:22 AM

Minor updates: remove some dead code from test, explain test cases better, replace term "field" with element in comments and variable names.

ingomueller-net published this revision for review.Feb 8 2023, 6:54 AM
ingomueller-net added inline comments.
mlir/include/mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h
57

I added std::decay like it is done for TypeConverter::addConversion in order to allow passing function pointers in addition to lambdas.

Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 6:54 AM
silvas accepted this revision.Feb 8 2023, 8:23 AM
This revision is now accepted and ready to land.Feb 8 2023, 8:23 AM