llvm-project/mlir/examples/toy
Alex Zinenko 5446ec8507 [mlir] take MLIRContext instead of LLVMDialect in getters of LLVMType's
Historical modeling of the LLVM dialect types had been wrapping LLVM IR types
and therefore needed access to the instance of LLVMContext stored in the
LLVMDialect. The new modeling does not rely on that and only needs the
MLIRContext that is used for uniquing, similarly to other MLIR types. Change
LLVMType::get<Kind>Ty functions to take `MLIRContext *` instead of
`LLVMDialect *` as first argument. This brings the code base closer to
completely removing the dependence on LLVMContext from the LLVMDialect,
together with additional support for thread-safety of its use.

Depends On D85371

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D85372
2020-08-06 11:05:40 +02: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] take MLIRContext instead of LLVMDialect in getters of LLVMType's 2020-08-06 11:05:40 +02:00
Ch7 [mlir] take MLIRContext instead of LLVMDialect in getters of LLVMType's 2020-08-06 11:05:40 +02: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

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 docs/Tutorials/Toy at the root of the project for more informations.