[PATCH] add __attribute__ no_uninitialized_checks. Map no_uninitialized_checks/no_thread_safety_analysis to LLVM function attributes.

Chandler Carruth chandlerc at gmail.com
Wed Feb 13 10:29:21 PST 2013


  Feel free to submit as-is to get bots green and make progress. See comments below -- we should discuss those separately. I'll try to send a cfe-dev email when I can?


================
Comment at: docs/LanguageExtensions.rst:1609
@@ +1608,3 @@
+
+Use ``__attribute__((no_thread_safety_analysis))`` on a function declaration
+to specify that checks for data races on plain (non-atomic) memory accesses
----------------
I actually find it really unfortunate that this attribute and the -Wthread-safety escape hatch attribute are the same. I suspect there are many scenarios where users can't accomodate the reduced programming model checked by -Wthread-safety, use this attribute to escape that analysis, and would still like TSan to point out the actual races.

Thoughts?

================
Comment at: docs/MemorySanitizer.rst:83
@@ -82,1 +82,3 @@
 
+``__attribute__((no_uninitialized_checks))``
+-----------------------------------------------
----------------
I think we should aim for more consistency across the attribute names. I think that will benefit users more than anything else...

Is there a reason not to tie these to the 'sanitize' naming scheme?


http://llvm-reviews.chandlerc.com/D390



More information about the cfe-commits mailing list