Page MenuHomePhabricator

[mlir:PDLL-LSP] Add a custom LSP command for viewing the output of PDLL
ClosedPublic

Authored by rriddle on May 2 2022, 10:16 AM.

Details

Summary

This commit adds a new PDLL specific LSP command, pdll.viewOutput, that
allows for viewing the intermediate outputs of a given PDLL file. The available
intermediate forms currently mirror those in mlir-pdll, namely: AST, MLIR, CPP.
This is extremely useful for a developer of PDLL, as it simplifies various testing,
and is also quite useful for users as they can easily view what is actually being
generated for their PDLL files.

This new command is added to the vscode client, and is available in the right
client context menu of PDLL files, or via the vscode command palette.

Diff Detail

Event Timeline

rriddle created this revision.May 2 2022, 10:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 10:16 AM
rriddle requested review of this revision.May 2 2022, 10:16 AM
rriddle edited the summary of this revision. (Show Details)
rriddle updated this revision to Diff 426559.May 2 2022, 7:42 PM
rriddle edited the summary of this revision. (Show Details)
rriddle updated this revision to Diff 426838.May 3 2022, 2:30 PM
rriddle updated this revision to Diff 429571.May 15 2022, 3:24 PM
rriddle updated this revision to Diff 430288.May 18 2022, 2:19 AM
rriddle updated this revision to Diff 430848.May 19 2022, 4:38 PM
rriddle updated this revision to Diff 431752.May 24 2022, 12:22 PM
jpienaar accepted this revision.May 28 2022, 11:26 AM

A little bit too dev focussed on first impression, but esp as new language this is useful for transparency and could reduce debug cycles quite a lot. (We should have a visualizer for matching at some point ;-))

This revision is now accepted and ready to land.May 28 2022, 11:26 AM

A little bit too dev focussed on first impression, but esp as new language this is useful for transparency and could reduce debug cycles quite a lot. (We should have a visualizer for matching at some point ;-))

Yeah agreed it's mostly dev focused, but it shouldn't negatively affect normal users at all (I liken it to the "View AST" support in clangd). It's been somewhat useful for me quite a few times, and it should also help users that want to see what's actually being generated (we've seen people get frustrated with this on the tablegen side before).

This revision was landed with ongoing or failed builds.May 30 2022, 5:43 PM
This revision was automatically updated to reflect the committed changes.