Add mention to avoid cl::opt for MLIR passes in the developer guide
authorMehdi Amini <aminim@google.com>
Tue, 19 Nov 2019 19:25:37 +0000 (11:25 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 19 Nov 2019 19:26:12 +0000 (11:26 -0800)
PiperOrigin-RevId: 281338448

mlir/g3doc/DeveloperGuide.md

index 151e2f8..7d86841 100644 (file)
@@ -38,6 +38,12 @@ 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`.
 
+We also avoid `cl::opt` to provide pass options in favor of the
+[pass options](WritingAPass.md#instance-specific-pass-options) mechanism. This
+allows for these options to be serialized in a pass pipeline description, as
+well as passing different options to multiple instances of a pass in the same
+pipeline.
+
 ## Testing guidelines
 
 See here for the [testing guide](TestingGuide.md).