[PATCH] D73590: [mlir] Add a document detailing the design of the SymbolTable.

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 12:45:50 PST 2020


nicolasvasilache added inline comments.
Herald added a subscriber: Joonsoo.


================
Comment at: mlir/docs/SymbolsAndSymbolTables.md:26
+some of the core IR data structures, which becomes quite inefficient. To enable
+this, MLIR uses local pools for constant values as well as `Symbol` accesses for
+global values and variables. This document details the design of `Symbols`, what
----------------
I am having a bit of trouble inferring whether `this` refers to `thread-safe`, or `thread-safe but expensive locking` or `thread-safe with locking that is not expensive` or something else.


================
Comment at: mlir/docs/SymbolsAndSymbolTables.md:50
+
+An `Symbol` operation may use the `OpTrait::Symbol` trait, and *must* adhere to
+the following:
----------------
s/An/A/


================
Comment at: mlir/docs/SymbolsAndSymbolTables.md:88
+As described above, `Symbols` act as an auxiliary way of defining uses of
+operations to the traditional SSA use-list. As such, it is imperative to provide
+similar functionality to manipulate and inspect the list of uses and the users.
----------------
Unrelated question, would this (be a reasonable mechanism for | could be extended to support) aliasing for buffer-like semantics?

One of the difficulties when writing DRR for Linalg on tensors is that there are no use-def chains but instead aliasings coming from taking subviews and from a memref being an "input or an output operand" of a linalg op.

Some of the mechanisms you put in place here seem like they could apply and maybe make things significantly better re writing chains of read/write dependencies.
The semantics of linalg guarantee full buffer writes at that level of abstraction so it "behaves like SSA" (hand-wavy) from this point of view. 

The big missing thing would be supporting control-flow but it's not like I'm doing anything with that anyway atm.
I also see there is a big difference between aliasing and "unique string names" but I can't shake the feeling this may also help more generally.

Do you see a connection between the 2 or am I imagining things and pattern-matching too much on "alternative to traditional SSA use-list"?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73590/new/

https://reviews.llvm.org/D73590





More information about the llvm-commits mailing list