[RFC] Revamp dialect registration

Some updates:

  • This is documented in the FAQ as Registered, loaded, dependent: what’s up with Dialects management?, and in a small section of the Pass Management doc.
  • Upstream LLVM/MLIR is clean from any dependency on the global registry.
  • The registry is disabled by default now, if you are downstream and still in process of migrating, you can re-enable the global registry (but we’d like to remove all this “soon” so please don’t continue to depend on it).
  • As part of this work: OpPassManager does not depend on MLIRContext anymore, which allow to build a pass pipeline ahead of time.

Next step is to delete entirely the registry and all the global registration facilities for dialects in the coming month: please upgrade your project.