HomePhabricator

Remove static registration for dialects, and the "alwayslink" hack for passes

Authored by joker-eph-DISABLED on Feb 12 2020, 1:03 AM.

Description

Remove static registration for dialects, and the "alwayslink" hack for passes

In the previous state, we were relying on forcing the linker to include
all libraries in the final binary and the global initializer to self-register
every piece of the system. This change help moving away from this model, and
allow users to compose pieces more freely. The current change is only "fixing"
the dialect registration and avoiding relying on "whole link" for the passes.
The translation is still relying on the global registry, and some refactoring
is needed to make this all more convenient.

Differential Revision: https://reviews.llvm.org/D74461