llvm-project/mlir/examples/toy
River Riddle 9b9c647cef Add support for nested symbol references.
This change allows for adding additional nested references to a SymbolRefAttr to allow for further resolving a symbol if that symbol also defines a SymbolTable. If a referenced symbol also defines a symbol table, a nested reference can be used to refer to a symbol within that table. Nested references are printed after the main reference in the following form:

  symbol-ref-attribute ::= symbol-ref-id (`::` symbol-ref-id)*

Example:

  module @reference {
    func @nested_reference()
  }

  my_reference_op @reference::@nested_reference

Given that SymbolRefAttr is now more general, the existing functionality centered around a single reference is moved to a derived class FlatSymbolRefAttr. Followup commits will add support to lookups, rauw, etc. for scoped references.

PiperOrigin-RevId: 279860501
2019-11-11 18:18:31 -08:00
..
Ch1 NFC: Uniformize parser naming scheme in Toy tutorial to camelCase and tidy a bit of the implementation. 2019-11-06 18:21:03 -08:00
Ch2 Add support for nested symbol references. 2019-11-11 18:18:31 -08:00
Ch3 Add support for nested symbol references. 2019-11-11 18:18:31 -08:00
Ch4 Add support for nested symbol references. 2019-11-11 18:18:31 -08:00
Ch5 Add support for nested symbol references. 2019-11-11 18:18:31 -08:00
Ch6 Add support for nested symbol references. 2019-11-11 18:18:31 -08:00
Ch7 Add support for nested symbol references. 2019-11-11 18:18:31 -08:00
CMakeLists.txt Add Ch-7 of the toy tutorial detailing how to define new types. 2019-11-07 09:54:04 -08:00
README.md Move the top-level `tutorial` as `Linalg` nested in the examples folder 2019-04-03 19:21:38 -07:00

README.md

Toy Tutorial

This contains sample code to support the tutorial on using MLIR for building a compiler for a simple Toy language.

See g3doc/Tutorials/Toy at the root of the repository for more informations.