[PATCH][google] Add warning flags for clang compatibility

2012-10-16 Thread Delesley Hutchins
This patch adds the clang thread safety warning flags as recognized warning flags that do nothing, for command-line compatibility with clang. Enclosed patch is for branches/google/gcc-4_6, I have identical patches for google/gcc-4_7 and google/main. Tested on linux x86. -- DeLesley Hutchins

Re: [PATCH][google] Add warning flags for clang compatibility

2012-10-16 Thread Delesley Hutchins
Yes, but that won't happen for a while yet. On Tue, Oct 16, 2012 at 12:43 PM, Diego Novillo wrote: > On Tue, Oct 16, 2012 at 3:19 PM, Delesley Hutchins > wrote: >> This patch adds the clang thread safety warning flags as recognized >> warning flags that do no

Re: [PATCH][google] Add warning flags for clang compatibility

2012-10-16 Thread Delesley Hutchins
Committed. google/gcc-4_6: r192510. google/gcc-4_7: r192511. google/main: r192513. On Tue, Oct 16, 2012 at 12:44 PM, Delesley Hutchins wrote: > Yes, but that won't happen for a while yet. > > On Tue, Oct 16, 2012 at 12:43 PM, Diego Novillo wrote: >> On Tue, Oct 16, 2012

Re: [PATCH][google] Add warning flags for clang compatibility

2012-10-17 Thread Delesley Hutchins
google/integration: r192542. On Tue, Oct 16, 2012 at 1:00 PM, Delesley Hutchins wrote: > Committed. > google/gcc-4_6: r192510. > google/gcc-4_7: r192511. > google/main: r192513. > > On Tue, Oct 16, 2012 at 12:44 PM, Delesley Hutchins > wrote: >> Yes, but that w

[PATCH] [Annotalysis] Fix ICE caused by ipa-sra optimization.

2011-11-02 Thread Delesley Hutchins
-optimization) can be turned on to inform the user that certain attributes have been removed by optimization. Bootstrapped and passed gcc regression testsuite on x86_64-unknown-linux-gnu.  Okay for google/gcc-4_6?  -DeLesley Changelog.google-4_6:2011-11-02  DeLesley Hutchins      * tree-threadsafe

Re: [PATCH] [Annotalysis] Fix ICE caused by ipa-sra optimization.

2011-11-03 Thread Delesley Hutchins
esley Changelog.google-4_6: 2011-11-02  DeLesley Hutchins      * tree-threadsafe-analyze.c:      Ignores invalid attributes, issues a warning, recovers gracefully. * common.opt: Adds new thread safety warning. testsuite/Changelog.google-4_6: 2011-11-02  DeLesley Hutchins    * g++.dg/threa

Re: [PATCH] [Annotalysis] Fix ICE caused by ipa-sra optimization.

2011-11-03 Thread Delesley Hutchins
generates extra warnings, which may break the build for some users. Which would users prefer: knowing that annotalysis is suppressing warnings, or having to update their build files to pass in an extra flag to turn off the warnings? -DeLesley -- DeLesley Hutchins | Software Engineer | deles...@

[PATCH] [Annotalysis] Add support for arrays in lock expressions

2011-11-03 Thread Delesley Hutchins
x86_64-unknown-linux-gnu. Okay for google/gcc-4_6? -DeLesley Changelog.google-4_6: 2011-11-03 DeLesley Hutchins * tree-threadsafe-analyze.c (get_canonical_lock_expr): Add support for pointer arithmetic operations testsuite/Changelog.google-4_6: 2011-11-02 DeLesley Hutchins * g

Re: [PATCH] [Annotalysis] Fix ICE caused by ipa-sra optimization.

2011-11-03 Thread Delesley Hutchins
New patch with suggested changes incorporated. Warning now on by default, asserts put back if ipa-sra not enabled, and style fixes. -DeLesley On Thu, Nov 3, 2011 at 11:06 AM, Diego Novillo wrote: > On Thu, Nov 3, 2011 at 12:41, Delesley Hutchins wrote: >>> I wonder... how abo

Re: [PATCH] [Annotalysis] Fix ICE caused by ipa-sra optimization.

2011-11-04 Thread Delesley Hutchins
gt; Bootstrapped and passed gcc regression testsuite on >> x86_64-unknown-linux-gnu.  Okay for google/gcc-4_6? >> >>  -DeLesley >> >> Changelog.google-4_6: >> 2011-11-02  DeLesley Hutchins   >>    * tree-threadsafe-analyze.c: >>      Ignores invalid a

[PATCH] [Annotalysis] Support trylock attributes on virtual methods.

2011-11-08 Thread Delesley Hutchins
This patch fixes a bug wherein the trylock attribute would not work if it was attached to a virtual method. Bootstrapped and passed gcc regression testsuite on x86_64-unknown-linux-gnu. Okay for google/gcc-4_6? -DeLesley Changelog.google-4_6: 2011-11-08 DeLesley Hutchins * tree

Re: [PATCH] [Annotalysis] Add support for arrays in lock expressions

2011-11-10 Thread Delesley Hutchins
> Why PLUS_EXPR and MULT_EXPR?  Pointer arithmetic should use > POINTER_PLUS_EXPR exclusively.  I don't think you should be seeing > PLUS_EXPRs here.  The MULT_EXPR show up in scaling expressions? MULT_EXPR shows up in array indexing, since the index is multiplied by the size of the element; gcc c

Re: [PATCH] [Annotalysis] Add support for arrays in lock expressions

2011-11-10 Thread Delesley Hutchins
> But you should not see such an expression in gimple.  The array index is > always a gimple_val. I'm not sure what you mean. The expression array[i+1] compiles to the following (courtesy of dump-tree-ssa): D.2095_4 = (long unsigned int) i_1; D.2096_5 = D.2095_4 + 1; D.2097_6 = D.2096_5 * 4; D

Re: [PATCH] [Annotalysis] Support trylock attributes on virtual methods.

2011-11-10 Thread Delesley Hutchins
> What about the other spots where we call gimple_call_fndecl, shouldn't we > call get_fdecl_from_gimple_stmt instead? Good point. I've gone through and updated the necessary spots. New patch with all fixes is attached. -DeLesley -- DeLesley Hutchins | Software

[PATCH] [Annotalysis] Fix internal compiler errors in thread safety analysis.

2011-09-13 Thread Delesley Hutchins
correctly. Bootstrapped and passed gcc regression testsuite on x86_64-unknown-linux-gnu. Tested on google core components. Okay for google/gcc-4_6? -DeLesley gcc/Changelog.annotalysis: 2011-9-13 DeLesley Hutchins * gcc/cp/class.c (cp_get_virtual_function_decl) bugfix where type is

[PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-27 Thread Delesley Hutchins
google/gcc-4_6? -DeLesley cp/Changelog.google-4_6: 2011-9-27 DeLesley Hutchins * cp/parser.c (cp_parser_late_parsing_attribute_arg_lists) fixed case where the potential clone is a template. testsuite/Changelog.google-4_6: 2011-9-27 DeLesley Hutchins * testsuite/g++.dg

[PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
, then why step into templates at all?   -DeLesley On Thu, Sep 29, 2011 at 8:42 AM, Diego Novillo wrote: > > On Thu, Sep 29, 2011 at 11:26, Ollie Wild wrote: > > On Thu, Sep 29, 2011 at 10:13 AM, Delesley Hutchins > > wrote: > >> > >> Unfortunately, DECL_CLONED_FUNC

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
d no such confidence. -DeLesley On Thu, Sep 29, 2011 at 10:41 AM, Diego Novillo wrote: > On 11-09-29 13:21 , Delesley Hutchins wrote: >> >> I don't have a test case, but look at the definitions of the two >> macros in cp/cp-tree.h. DECL_CLONED_FUNCTION_P calls >> decl_cl

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
That seems much cleaner! LGTM. Are you submitting the patch? I can submit the test case. -DeLesley On Thu, Sep 29, 2011 at 1:50 PM, Diego Novillo wrote: > On 11-09-29 15:19 , Delesley Hutchins wrote: > >> However, I'm not convinced that it will work in all cases.  I wish I

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
No problem. Will do. -DeLesley On Thu, Sep 29, 2011 at 2:44 PM, Diego Novillo wrote: > On 11-09-29 17:24 , Delesley Hutchins wrote: >> >> That seems much cleaner!  LGTM.  Are you submitting the patch?  I can >> submit the test case. > > I tested it on an uncle

[PATCH] [Annotalysis] Fix bogus warnings caused by ipa-sra optimization

2011-09-29 Thread Delesley Hutchins
: 2011-9-27 DeLesley Hutchins * cp/tree-threadsafe-analyze.c (process_function_attrs) detect clones and suppress warnings testsuite/Changelog.google-4_6: 2011-9-27 DeLesley Hutchins * testsuite/g++.dg/thread-ann/thread_annot_lock-82.C (new regression test) Index

[PATCH] [Annotalysis] Bugfix for spurious thread safety warnings with shared mutexes

2011-10-10 Thread Delesley Hutchins
Okay for google/gcc-4_6? -DeLesley Changelog.google-4_6: 2011-10-10 DeLesley Hutchins * tree-threadsafe-analyze.c (remove_lock_from_lockset) testsuite/Changelog.google-4_6: 2011-10-10 DeLesley Hutchins * g++.dg/thread-ann/thread_annot_lock-83.C: New regression test

[PATCH] [Annotalysis] Bugfix where lock function is attached to a base class.

2011-10-11 Thread Delesley Hutchins
/gcc-4_6? -DeLesley Changelog.google-4_6: 2011-10-11 DeLesley Hutchins * tree-threadsafe-analyze.c (get_canonical_lock_expr) testsuite/Changelog.google-4_6: 2011-10-11 DeLesley Hutchins * g++.dg/thread-ann/thread_annot_lock-83.C Index: gcc/testsuite/g++.dg/thread-ann

Re: [PATCH] [Annotalysis] Bugfix for spurious thread safety warnings with shared mutexes

2011-10-12 Thread Delesley Hutchins
k was present, which is not what we want. IMHO, lock_set_contains is operating correctly; it was just passed the wrong arguments. -DeLesley On Tue, Oct 11, 2011 at 2:34 PM, Ollie Wild wrote: > On Mon, Oct 10, 2011 at 3:37 PM, Delesley Hutchins > wrote: >> >> --- gcc/tr

[PATCH] [annotalysis] Support IPA-SRA cloned functions (issue 4591066)

2011-06-22 Thread Delesley Hutchins
/annotalysis?   -DeLesley 2011-06-22  Le-Chun Wu  ,  DeLesley Hutchins         * tree-threadsafe-analyze.c (build_fully_qualified_lock): Handle         IPA-SRA cloned methods.         (get_canonical_lock_expr): Fold expressions that are INDIRECT_REF on         top of ADDR_EXPR

[PATCH] [annotalysis] Merge of google/integration into annotalysis

2011-06-23 Thread Delesley Hutchins
This patch merges recent changes from google/integration into branches/annotalysis. Bootstrapped and passed GCC regression testsuite on x86_64-unknown-linux-gnu. Okay for branches/annotalysis? -- DeLesley Hutchins | Software Engineer | deles...@google.com | 505-206-0315 Property changes on

Re: [PATCH] [annotalysis] Merge of google/integration into annotalysis

2011-06-23 Thread Delesley Hutchins
google/integration up to revision 175149 has now been merged into branches/annotalysis. On Thu, Jun 23, 2011 at 3:37 PM, Diego Novillo wrote: > On Thu, Jun 23, 2011 at 18:08, Delesley Hutchins wrote: >> This patch merges recent changes from google/integration into >> branc

[PATCH] [Annotalysis] Fixes virtual method calls when type is unknown

2011-06-30 Thread Delesley Hutchins
DeLesley Hutchins * tree-threadsafe-analyze.c (handle_call_gs): Fixes case where the virtual method callee has unknown type. Index: gcc/testsuite/g++.dg/thread-ann/thread_annot_lock-79.C === --- gcc/testsuite/g++.dg

Re: [PATCH] [Annotalysis] Fixes virtual method calls when type is unknown

2011-07-01 Thread Delesley Hutchins
> If you in some way rely on static types of those pointers, you may be > in for a number of unpleasant surprises, because these types do not > really have any meaning at all. Annotalysis is just a static analyzer, so if the types are somehow inaccurate (as they are in certain cases), then the onl

Re: [PATCH] [Annotalysis] Fixes virtual method calls when type is unknown

2011-07-01 Thread Delesley Hutchins
This is indeed a problem. Good catch; thanks! -DeLesley On Fri, Jul 1, 2011 at 11:50 AM, Martin Jambor wrote: > Hi, > > On Fri, Jul 01, 2011 at 09:31:30AM -0700, Delesley Hutchins wrote: >> > Just out of curiosity, I does your >> > analysis crash also on the te

[PATCH] [Annotalysis] Change to get_virtual_function_decl

2011-07-06 Thread Delesley Hutchins
method, in cases where the static type cannot be accurately determined. Bootstrapped and passed GCC regression testsuite on x86_64-unknown-linux-gnu. Okay for branches/annotalysis and google/main? -DeLesley 2011-07-06 DeLesley Hutchins * cp_get_virtual_function_decl.c

[PATCH] [Annotalysis] Fix to get_canonical_lock_expr

2011-07-11 Thread Delesley Hutchins
ase) == ADDR_EXPR) +lock = TREE_OPERAND (canon_base, 0); + else +lock = build1 (INDIRECT_REF, + TREE_TYPE (TREE_TYPE (canon_base)), canon_base); break; } default: -- DeLesley Hutchins | Software Engineer | deles...@google.com | 505-206-0315

Re: [PATCH] [Annotalysis] Fix to get_canonical_lock_expr

2011-07-11 Thread Delesley Hutchins
Oops. Changlog entry should read: 2011-07-11   DeLesley Hutchins        * tree-threadsafe-analyze.c (tree-threadsafe-analyze.c) Changed to force rewrite on MEM_REF

[PATCH] [Annotalysis] Fix to memory corruption issue in Annotalysis

2011-07-19 Thread Delesley Hutchins
This patch changes lock_expr_tab so that it is allocated by the garbage collector, and properly marked as a GC root. Bootstrapped and passed GCC regression testsuite on x86_64-unknown-linux-gnu. Okay for branches/annotalysis and google/main? -DeLesley 2011-07-19 DeLesley Hutchins

Re: [google] Disable annotalysis in google/main (issue4816050)

2011-07-25 Thread Delesley Hutchins
gt;  static bool >  gate_threadsafe_analyze (void) >  { > -  return warn_thread_safety != 0; > +  /* FIXME google/main - Annotalysis is currently broken.  */ > +  return false; >  } > >  struct gimple_opt_pass pass_threadsafe_analyze = > > -- > This patch is available for review at http://codereview.appspot.com/4816050 > -- DeLesley Hutchins | Software Engineer | deles...@google.com | 505-206-0315

[google] Backport r176188, r176489 from google/main to google/gcc-4_6 branch.

2011-07-26 Thread Delesley Hutchins
Committed. -- DeLesley Hutchins | Software Engineer | deles...@google.com | 505-206-0315

[PATCH] [google] [annotalysis] Fix remove operation from pointer_set in case of hash collisions

2011-07-26 Thread Delesley Hutchins
/Changelog.annotalysis: 2011-7-26 DeLesley Hutchins * gcc/pointer-set.c (pointer_set_delete) bugfix for case of hash collisions Index: gcc/pointer-set.c === --- gcc/pointer-set.c (revision 176809) +++ gcc/pointer-set.c (working

Re: [PATCH] [google] [annotalysis] Fix remove operation from pointer_set in case of hash collisions

2011-07-26 Thread Delesley Hutchins
ut it wouldn't be a normal compiler test case; where would I put it? -DeLesley On Tue, Jul 26, 2011 at 5:59 PM, Diego Novillo wrote: > On Tue, Jul 26, 2011 at 16:13, Delesley Hutchins wrote: >> This patch fixes a bug in pointer_set.c, where removing a pointer from >> a pointer s