This project depends on MLIR and LLVM, and it is occasionally useful to improve them.
To get set up for this:
1) Follow the "[How to Contribute](https://mlir.llvm.org/getting_started/Contributing/)" instructions, and install the right tools, e.g. 'arcanist' and `clang-format`.
2) Get an LLVM Phabricator account
3) [ask for LLVM commit access](https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access).
### Submitting a patch
The patch flow goes like this:
1) Check out the LLVM mono repo (as described above).
2) Make changes to your codebase.
3) Stage your changes with `git add`.
4) Run clang-format to tidy up the details of the patch with `git clang-format origin/master`
5) Create a [patch in Phabricator](https://llvm.org/docs/Phabricator.html) with `arc diff`.
6) Iterate on review, changing your code and sending another patch with `arc diff`.
When your review converges and your patch is approved, do the following:
1) commit your changes with `git commit`
2) rebase your changes with `git pull --rebase`
3) retest your patch with `ninja check-mlir` (or whatever other target makes sense)