This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add a SharedSymbolTableCollection class
ClosedPublic

Authored by Mogball on Feb 21 2023, 10:06 AM.

Details

Summary

This class wraps a SymbolTableCollection to allow shared access to the
collection of symbol tables (but not the individual symbol tables). This
can be used, for example, in a pass that shards work among symbols that
requires symbol lookups.

Diff Detail

Event Timeline

Mogball created this revision.Feb 21 2023, 10:06 AM
Mogball requested review of this revision.Feb 21 2023, 10:06 AM
rriddle accepted this revision.Feb 22 2023, 9:14 AM

This seems like a fine start. It'd be nice if the name was a bit closer to "ThreadSafe" aspect, like "LockedSymbolTableCollection"(or something), to make it more apparent what the purpose is on first glance.

This revision is now accepted and ready to land.Feb 22 2023, 9:14 AM
rriddle added inline comments.Feb 22 2023, 9:15 AM
mlir/include/mlir/IR/SymbolTable.h
296–297

Can you detail the thread safe aspects in the docs? I don't think "shared" accurately conveys that on its own.

Mogball updated this revision to Diff 499644.Feb 22 2023, 1:57 PM
Mogball marked an inline comment as done.

comments

This revision was landed with ongoing or failed builds.Feb 22 2023, 1:57 PM
This revision was automatically updated to reflect the committed changes.