This is an archive of the discontinued LLVM Phabricator instance.

[mlir-lsp-server] Add support for processing split files
ClosedPublic

Authored by rriddle on May 17 2021, 5:38 PM.

Details

Summary

MLIR tools very commonly use // ----- to split a file into distinct sub documents, that are processed separately. This revision adds support to mlir-lsp-server for splitting MLIR files based on this sigil, and processing them separately.

Depends On D102644

Diff Detail

Event Timeline

rriddle created this revision.May 17 2021, 5:38 PM
rriddle requested review of this revision.May 17 2021, 5:38 PM
jpienaar accepted this revision.May 26 2021, 11:10 AM

Nice, thanks!

mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
576

Should this be a reference or pointer? Seems like an expensive struct to accidentally copy.

630

Perhaps add a TODO that we make this some constant to ensure these remain in sync with mlir-opt?

mlir/test/mlir-lsp-server/definition-split-file.test
2

Could you add a comment explaining the test?

This revision is now accepted and ready to land.May 26 2021, 11:10 AM
rriddle updated this revision to Diff 348392.May 27 2021, 2:36 PM
rriddle marked 3 inline comments as done.

update

mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
576

Just deleted the copy constructor on MLIRDocument.

This revision was landed with ongoing or failed builds.May 27 2021, 2:47 PM
This revision was automatically updated to reflect the committed changes.