Skip to content
Commit 74461512 authored by MLIR Team's avatar MLIR Team Committed by A. Unique TensorFlower
Browse files

Add Instance Specific Pass Options.

This allows individual passes to define options structs and for these options to be parsed per instance of the pass while building the pass pipeline from the command line provided textual specification.

The user can specify these per-instance pipeline options like so:
```
struct MyPassOptions : public PassOptions<MyPassOptions> {
  Option<int> exampleOption{*this, "flag-name", llvm::cl::desc("...")};
  List<int> exampleListOption{*this, "list-flag-name", llvm::cl::desc("...")};
};

static PassRegistration<MyPass, MyPassOptions> pass("my-pass", "description");
```

PiperOrigin-RevId: 273650140
parent 71c79622
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment