Merge branch 'master' into iree
tree: c742c91e5e38527f3a8ba216f0095200cff7bed8
  1. .github/
  2. build_tools/
  3. include/
  4. lib/
  5. test/
  6. tools/
  7. .clang-format
  8. .gitignore
  9. CMakeLists.txt
  10. LICENSE
  11. README.md
README.md

MLIR EmitC

MLIR dialect to emit C++ code, forked from https://reviews.llvm.org/D76571.

Building

This setup assumes that you have built LLVM and MLIR in $BUILD_DIR and installed them to $PREFIX. To build and launch the tests, run

mkdir build && cd build
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. -DMLIR_DIR=$PREFIX/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=$BUILD_DIR/bin/llvm-lit
cmake --build . --target check-emitc

Note: Make sure to pass -DLLVM_INSTALL_UTILS=ON when building LLVM with CMake in order to install FileCheck to the chosen installation prefix.