tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.74k stars 260 forks source link

Implement support for qualified symbols #186

Open sherhut opened 5 years ago

sherhut commented 5 years ago

As discussed in the RFC it would be great to have a way to express qualified symbols that refer to objects in nested modules (or otherwise nested scopes that carry a symbol table).

For this, SymbolRef attributes would need to gain their own storage implementation that supports to store a chain of symbols. This could be either done by pointer chaining or one could use llvm::TrailingObjects like FusedLocationStorage does.

We also need to make sure that resolving symbols against a symbol table takes their qualified nature into account. To start with, this could be hard-wired into the symbol table implementation. In the the long term, we should spin it out into a configurable component.