Page MenuHomePhabricator

[mlir-lsp-server] Add support for hover on region operations
ClosedPublic

Authored by rriddle on Jun 4 2021, 5:06 PM.

Details

Summary

This revision adds support for hover on region operations, by temporarily removing the regions during printing. This revision also tweaks the hover format for operations to include symbol information, now that FuncOp can be shown in the hover.

Diff Detail

Event Timeline

rriddle created this revision.Jun 4 2021, 5:06 PM
rriddle requested review of this revision.Jun 4 2021, 5:06 PM
jpienaar accepted this revision.Jun 7 2021, 8:12 AM
jpienaar added inline comments.
mlir/test/mlir-lsp-server/hover.test
117

Would have been nice if we could have { ... } here instead to be able to differentiate from an empty body or not. But that would require more invasive changes. ... Mmm, well we could add a op with a custom printer (which doesn't parse back :)) and then this region is just the "ElidedRegion" with the elided op.

This revision is now accepted and ready to land.Jun 7 2021, 8:12 AM
rriddle marked an inline comment as done.Jun 7 2021, 1:35 PM
rriddle added inline comments.
mlir/test/mlir-lsp-server/hover.test
117

Yeah, I think if we end up with a desire to support this in general we should add a printer flag that elides the region.

This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.