2019-05-03 09:58:47 +08:00
|
|
|
# Developer Guide
|
|
|
|
|
|
|
|
This document attempts to describe a few developer policies used in MLIR (such
|
|
|
|
as coding standards used) as well as development approach (such as, testing
|
|
|
|
methods).
|
|
|
|
|
|
|
|
## Style guide
|
|
|
|
|
|
|
|
MLIR follows the [LLVM style](https://llvm.org/docs/CodingStandards.html) guide
|
|
|
|
except:
|
|
|
|
|
|
|
|
* Adopts [camelBack](https://llvm.org/docs/Proposals/VariableNames.html);
|
2019-05-04 09:43:22 +08:00
|
|
|
|
|
|
|
## Pass name and other command line options
|
|
|
|
|
|
|
|
To avoid collision between options provided by different dialects, the naming
|
|
|
|
convention is to prepend the dialect name to every dialect-specific passes and
|
2019-05-04 12:38:39 +08:00
|
|
|
options in general. Options that are specific to a pass should also be prefixed
|
|
|
|
with the pass name. For example, the affine dialect provides a loop tiling pass
|
|
|
|
that is registered on the command line as `-affine-tile`, and with a tile size
|
|
|
|
option that can be set with `-affine-tile-size`.
|