We really need passes to be tested individually with an opt like tool, let me know if you need more pointers.
I suspect you also should invest up-front in the same registration/description for passes as in the mlir core folder.
There should be a license header here I believe?
This kind of option is unusual: if you want to disable passes this is better done at the point where the pass pipeline is built.
(Also please use PassOptions instead of globals)
This comment seems misplaced
In general passes aren't supposed to depends on external entities like this: they are expected to be registered and invoked from an *-opt tool.
Here isn't clear why it can't just be a private instance for the pass?