Patchwork Address the comments (issue5492055)

login
register
mail settings
Submitter Dmitriy Vyukov
Date Dec. 16, 2011, 5:36 p.m.
Message ID <20111216173636.47B85C30C1@1024cores.msk.corp.google.com>
Download mbox | patch
Permalink /patch/131877/
State New
Headers show

Comments

Dmitriy Vyukov - Dec. 16, 2011, 5:36 p.m.
This is for google-main branch.
Ignore thunks in ThreadSanitizer pass.


--
This patch is available for review at http://codereview.appspot.com/5492055

Patch

Index: gcc/tree-tsan.c
===================================================================
--- gcc/tree-tsan.c	(revision 182401)
+++ gcc/tree-tsan.c	(working copy)
@@ -426,6 +426,10 @@ 
       ignore_init = 1;
     }
 
+  /* Must be some artificial thunk function.  */
+  if (DECL_ARTIFICIAL (cfun->decl) && DECL_IGNORED_P (cfun->decl))
+    return tsan_ignore_func;
+
   src_name = expand_location (cfun->function_start_locus).file;
   if (src_name == NULL)
     src_name = "";
Index: gcc/ChangeLog.google-main
===================================================================
--- gcc/ChangeLog.google-main	(revision 182401)
+++ gcc/ChangeLog.google-main	(working copy)
@@ -1,3 +1,7 @@ 
+2011-12-16   Dmitriy Vyukov  <dvyukov@google.com>
+
+        * tree-tsan.c (tsan_ignore): Add check for thunks.
+
 2011-12-16  Dehao Chen  <dehao@google.com>
 
 	* ipa-inline-transform.c (dump_inline_decision): New function.