[llvm-commits] Please review: adding Function attribute "ThreadSafety"
clattner at apple.com
Thu Mar 15 02:07:32 PDT 2012
On Mar 14, 2012, at 6:08 PM, Kostya Serebryany wrote:
> I would like to add one more function attribute: "ThreadSafety".
> Functions with this attribute will be instrumented by run-time thread-safety analysis tools (e.g. with ThreadSanitizer).
> This is similar to "AddressSafety" attribute used by AddressSanitizer (and SAFECode?).
> Clang already has the attribute "__attribute__((no_thread_safety_analysis))" which is used to disable static thread-safety analysis.
> In a separate change we will teach clang to unset ThreadSafety when no_thread_safety_analysis is present.
> (exactly as we do for no_address_safety_analysis and AddressSafety)
I'm skeptical of adding LLVM IR function attributes for each instrumentation pass. Have you investigated using module flags metadata to track this information? It is designed to be extensible for these sorts of uses.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits