http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55508



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |aldyh at gcc dot gnu.org,

                   |                            |torvald at gcc dot gnu.org



--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-28 
08:44:46 UTC ---

This is because the calls (with my pending patch builtins, but that hasn't been

reviewed yet) are added in between lower_tm? pass and the final tm

transformation pass, and there is

      /* We can have a nodeless call here if some pass after IPA-tm

         added uninstrumented calls.  For example, loop distribution

         can transform certain loop constructs into __builtin_mem*

         calls.  In this case, see if we have a suitable TM

         replacement and fill in the gaps.  */

      gcc_assert (DECL_BUILT_IN_CLASS (fn_decl) == BUILT_IN_NORMAL);

      enum built_in_function code = DECL_FUNCTION_CODE (fn_decl);

      gcc_assert (code == BUILT_IN_MEMCPY

                  || code == BUILT_IN_MEMMOVE

                  || code == BUILT_IN_MEMSET);

The question is what to do with the asan/tsan library calls in transactions. 

The asan report calls are just verification functions, which for normal

programs shouldn't have any visible effect, so perhaps we could lie about them

and say that they are transaction_safe (or transaction_callable?, dunno which)

and create cgraph nodes for them and clear node->local.tm_may_enter_irr,

basically pretend they aren't there.

For tsan the question is whether even that is useful at all when tsan doesn't

wrap begin/end/abort transaction library calls and doesn't take transactions

into account at all.

Reply via email to