Page MenuHomePhabricator

[mlir] Add hover support to mlir-lsp-server

Authored by rriddle on Apr 22 2021, 2:41 PM.



This provides information when the user hovers over a part of the source .mlir file. This revision adds the following hover behavior:

  • Operation:
    • Shows the generic form.
  • Operation Result:
    • Shows the parent operation name, result number(s), and type(s).
  • Block:
    • Shows the parent operation name, block number, predecessors, and successors.
  • Block Argument:
    • Shows the parent operation name, parent block, argument number, and type.

Diff Detail

Event Timeline

rriddle created this revision.Apr 22 2021, 2:41 PM
rriddle requested review of this revision.Apr 22 2021, 2:41 PM
mehdi_amini accepted this revision.May 7 2021, 12:32 PM
This revision is now accepted and ready to land.May 7 2021, 12:32 PM
jpienaar accepted this revision.May 7 2021, 1:01 PM
jpienaar added inline comments.



What happens in the case where we have ops with huge attributes? Should we do something similar to in the graphviz emitter and truncate?

rriddle updated this revision to Diff 343791.May 7 2021, 5:56 PM
rriddle marked 2 inline comments as done.



Added elision for element attributes, but we should probably look into adding an option that combines all of the desired printing flags into one. That way we can make it easier to log operations without needing to remember which flags you have to set to not destroy your terminal.

This revision was landed with ongoing or failed builds.May 7 2021, 6:09 PM
This revision was automatically updated to reflect the committed changes.