This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tsan] ThreadSanitizer instrumentation part


On Wed, Oct 31, 2012 at 11:00:17PM -0700, Xinliang David Li wrote:
> > +  /* Below are things we do not instrument
> > +     (no possibility of races or not implemented yet).  */
> > +  if (/* Compiler-emitted artificial variables.  */
> > +      (DECL_P (expr) && DECL_ARTIFICIAL (expr))
> > +      /* The var does not live in memory -> no possibility of races.  */
> > +      || (tcode == VAR_DECL
> > +          && TREE_ADDRESSABLE (expr) == 0
> 
>  ==> !TREE_ADDRESSABLE (expr)
> 
> > +         && TREE_STATIC (expr) == 0)
> 
> 
> To detect stack varaible, TREE_STATIC can not be used.  Use
> !DECL_EXTERNAL instead.

TREE_STATIC is right for that.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]