Displaying 3 results from an estimated 3 matches for "staticpassregistri".
Did you mean:
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
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
The mutex could be made an actual global static instead of a ManagedStatic.
This guarantees it would be constructed before main, and live until the
end of main. So even in PassRegistry's destructor, which would get call
during llvm_shutdown(), it would always have the same mutex. Ideally I'd
like to just delete the mutex, as it doesn't seem like anyone is using it
in a
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