This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Tablegen-LSP] Add support for a tracking definitions and references
ClosedPublic

Authored by rriddle on May 11 2022, 8:01 PM.

Details

Summary

This essentially builds an index for the parsed records and record values (fields).
This covers quite a few cases, but is limited by the currently lackluster location
tracking in tablegen. A followup will work on plumbing more locations through
tablegen, which should greatly improve what we can do here.

Diff Detail

Event Timeline

rriddle created this revision.May 11 2022, 8:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 8:01 PM
rriddle requested review of this revision.May 11 2022, 8:01 PM
rriddle updated this revision to Diff 429628.May 16 2022, 12:41 AM
rriddle edited the summary of this revision. (Show Details)
jpienaar accepted this revision.May 25 2022, 10:49 AM

A followup will work on plumbing more locations through

tablegen, which should greatly improve what we can do here.

Ooooooh, will be nice for refactoring tools too :)

mlir/lib/Tools/tblgen-lsp-server/TableGenServer.cpp
178 ↗(On Diff #429628)

Could you add comments here? (the previous one was where the location was empty or not tracked, this overlap I'm not sure where it is used and also seems to be discarding every instance except first seen and not sure why that's good)

This revision is now accepted and ready to land.May 25 2022, 10:49 AM
This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.