This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Make FunctionOpInterface inherit SymbolOpInterface
ClosedPublic

Authored by rriddle on Dec 16 2022, 2:42 AM.

Details

Summary

This lets users of FunctionOpInterface finally have the
name/visibility accessors from SymbolOpInterface. This also
lets us remove the clunky "getName" method from FunctionOpInterface.

Diff Detail

Event Timeline

rriddle created this revision.Dec 16 2022, 2:42 AM
rriddle requested review of this revision.Dec 16 2022, 2:42 AM
jpienaar accepted this revision.Jan 8 2023, 8:06 PM
jpienaar added inline comments.
mlir/include/mlir/IR/FunctionInterfaces.td
17

I'd include both of these rather than rely on transitivity (tblgen side I try to keep things dead simple, and while good to keep things minimal, explicit is less surprising).

This revision is now accepted and ready to land.Jan 8 2023, 8:06 PM
rriddle added inline comments.Jan 12 2023, 1:36 PM
mlir/include/mlir/IR/FunctionInterfaces.td
17

Why? I don't follow that anywhere else in tablegen, and it also breaks from our existing C++ coding style.

rriddle updated this revision to Diff 488760.Jan 12 2023, 1:37 PM
rriddle edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.