llvm-project/mlir/examples/toy
Dumitru Potop 9a0ea5994b [mlir] Support alignment in LLVM dialect GlobalOp
First step in adding alignment as an attribute to MLIR global definitions. Alignment can be specified for global objects in LLVM IR. It can also be specified as a named attribute in the LLVMIR dialect of MLIR. However, this attribute has no standing and is discarded during translation from MLIR to LLVM IR. This patch does two things: First, it adds the attribute to the syntax of the llvm.mlir.global operation, and by doing this it also adds accessors and verifications. The syntax is "align=XX" (with XX being an integer), placed right after the value of the operation. Second, it allows transforming this operation to and from LLVM IR. It is checked whether the value is an integer power of 2.

Reviewed By: ftynse, mehdi_amini

Differential Revision: https://reviews.llvm.org/D101492
2021-05-12 09:07:20 +02:00
..
Ch1 [MLIR] Discourage people from copying the toy examples 2020-05-13 10:37:06 -07:00
Ch2 [mlir][Toy] Update the tutorial to use tablegen for dialect declarations 2021-03-17 17:37:28 -07:00
Ch3 [PatternMatch] Big mechanical rename OwningRewritePatternList -> RewritePatternSet and insert -> add. NFC 2021-03-22 17:20:50 -07:00
Ch4 [PatternMatch] Big mechanical rename OwningRewritePatternList -> RewritePatternSet and insert -> add. NFC 2021-03-22 17:20:50 -07:00
Ch5 [PatternMatch] Big mechanical rename OwningRewritePatternList -> RewritePatternSet and insert -> add. NFC 2021-03-22 17:20:50 -07:00
Ch6 [mlir] Support alignment in LLVM dialect GlobalOp 2021-05-12 09:07:20 +02:00
Ch7 [mlir] Support alignment in LLVM dialect GlobalOp 2021-05-12 09:07:20 +02:00
CMakeLists.txt Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" 2020-10-04 15:17:34 -07: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.