Displaying 3 results from an estimated 3 matches for "staticpassregistry".
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
I actually had an idea about how to fix this in a relatively painless
manner. Although given my experience over the past 4 days, it might not be
best to call it painless without first trying :)
The idea is to make a StaticPassRegistry. RegisterPass<> only touches the
StaticPassRegistry, and nothing else touches the StaticPassRegistry. So
once you enter main(), StaticPassRegistry can be considered immutable. In
main(), the existing PassRegistry initializes itself from the
StaticPassRegistry. This *should* solve all the...
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
...er at google.com> wrote:
> > I actually had an idea about how to fix this in a relatively painless
> > manner. Although given my experience over the past 4 days, it might not
> be
> > best to call it painless without first trying :)
> >
> > The idea is to make a StaticPassRegistry. RegisterPass<> only touches
> the
> > StaticPassRegistry, and nothing else touches the StaticPassRegistry. So
> > once you enter main(), StaticPassRegistry can be considered immutable.
> In
> > main(), the existing PassRegistry initializes itself from the
> >...
2014 Jun 01
3
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
+cc original authors of these changes.
Is PassRegistry intended to be thread-safe? The header file explicitly
says that PassRegistry is not thread-safe, but there are mutexes and
locking used in the code. This is actually creating a problem, because of
a subtle bug involving static initialization order and shutdown.
In particular, the RegisterPass<> static template will get invoked