[LLVMdev] PassRegistry thread safety and ManagedStatic interaction

Amara Emerson amara.emerson at gmail.com
Mon Jun 2 03:20:32 PDT 2014


Hi Zachary,

On 1 June 2014 18:36, Zachary Turner <zturner at google.com> wrote:
> And what would it take to get RegisterPass<> to not rely on
> static initialization.  Is there any reason why we can't just initialize
> these at runtime early in main?

The pass infrastructure is designed so that individual passes can be
built as shared libraries and loaded at runtime (e.g. via opt), so the
passes require the use of the static initializer rather than
initializing in main.

Cheers,
Amara



More information about the llvm-dev mailing list