llvm-capstone/mlir/examples/toy
River Riddle 8d67d187ba [mlir][DialectConversion] Refactor how block argument types get converted
This revision removes the TypeConverter parameter passed to the apply* methods, and instead moves the responsibility of region type conversion to patterns. The types of a region can be converted using the 'convertRegionTypes' method, which acts similarly to the existing 'applySignatureConversion'. This method ensures that all blocks within, and including those moved into, a region will have the block argument types converted using the provided converter.

This has the benefit of making more of the legalization logic controlled by patterns, instead of being handled explicitly by the driver. It also opens up the possibility to support multiple type conversions at some point in the future.

This revision also adds a new utility class `FailureOr<T>` that provides a LogicalResult friendly facility for returning a failure or a valid result value.

Differential Revision: https://reviews.llvm.org/D81681
2020-06-18 15:59:22 -07:00
..
Ch1 [MLIR] Discourage people from copying the toy examples 2020-05-13 10:37:06 -07:00
Ch2 Register printer and context CL options with the toyc example 2020-06-10 19:59:40 +00:00
Ch3 Register printer and context CL options with the toyc example 2020-06-10 19:59:40 +00:00
Ch4 Register printer and context CL options with the toyc example 2020-06-10 19:59:40 +00:00
Ch5 [mlir] Update Toy tutorial to use callback-based loop constructors 2020-06-18 23:03:21 +02:00
Ch6 [mlir][DialectConversion] Refactor how block argument types get converted 2020-06-18 15:59:22 -07:00
Ch7 [mlir][DialectConversion] Refactor how block argument types get converted 2020-06-18 15:59:22 -07: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 [MLIR] Fix broken link locations after move to monorepo 2020-01-14 07:15:02 +00:00

Toy Tutorial

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

See docs/Tutorials/Toy at the root of the project for more informations.