Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mocusez committed Aug 8, 2024
1 parent 57ea54a commit 20bf339
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
**Note: This repository is only for reference purposes, if you want to use it, you need to find your own solutions to configure**

# CMake MLIR Toy Tutorial

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

See [docs/Tutorials/Toy](../../docs/Tutorials/Toy) at the root of the project for more informations.
See [docs/Tutorials/Toy](https://github.com/llvm/llvm-project/tree/main/mlir/docs/Tutorials/Toy) for more information.

In this repository, you can **run the MLIR toy tutorial (on Debian) without compile the LLVM project** 😋

## Environment

**Notice: You should enable Debian sid source**

- Debian
- CMake
- Ninja-Build
Expand All @@ -22,13 +22,8 @@ apt install llvm-18 clang-18 cmake ninja-build mlir-18-tools libmlir-18-dev
```

## Note

The `.td` file need run shell script to generate `.h` and `.cpp` , The reference shell script are on the folder

If you want Debug, you have to install GDB
```
mlir-tblgen-18 -gen-op-decls -I /usr/lib/llvm-18/include Ops.td > Ops.h.inc
mlir-tblgen-18 -gen-op-defs -I /usr/lib/llvm-18/include Ops.td > Ops.cpp.inc
mlir-tblgen-18 -gen-dialect-decls -I /usr/lib/llvm-18/include Ops.td > Dialect.h.inc
mlir-tblgen-18 -gen-dialect-defs -I /usr/lib/llvm-18/include Ops.td > Dialect.cpp.inc
apt install gdb
```

0 comments on commit 20bf339

Please sign in to comment.