Re: [cxx-conversion] various hash tables, part 1/2

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo dnovi...@google.com wrote: On Sat, Dec 1, 2012 at 8:47 PM, Lawrence Crowl cr...@googlers.com wrote: +inline bool +attribute_hasher::equal (const value_type *spec, const compare_type *str) +{ + return (!strncmp (spec-name, str-str, str-length) I have a slight

Re: [cxx-conversion] various hash tables, part 1/2

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo dnovi...@google.com wrote: On 2012-12-03 14:24 , Lawrence Crowl wrote: -static int -htab_cu_eq (const void *of1, const void *of2) +inline bool +cu_hash_table_entry_hasher::equal (const value_type *entry1, + const compare_type *entry2

Re: [cxx-conversion] various hash tables, part 2/2

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo dnovi...@google.com wrote: On 2012-12-01 20:48 , Lawrence Crowl wrote: +inline bool +cselib_hasher::equal (const value_type *v, const compare_type *x_arg) +{ + struct elt_loc_list *l; + rtx x = CONST_CAST_RTX (x_arg); + enum machine_mode mode = GET_MODE (x

Re: [cxx-conversion] ggc-common hash tables

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo dnovi...@google.com wrote: On 2012-12-01 20:46 , Lawrence Crowl wrote: Index: gcc/ChangeLog 2012-11-30 Lawrence Crowl cr...@google.com * hash-table.h (class hash_table): Correct many methods with parameter types compare_type to the correct

Re: [cxx-conversion] tree-related hash tables

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo dnovi...@google.com wrote: On 2012-12-01 20:45 , Lawrence Crowl wrote: Index: gcc/tree-hasher.h === --- gcc/tree-hasher.h(revision 0) +++ gcc/tree-hasher.h(revision 0) @@ -0,0 +1,56

Re: [cxx-conversion] gimplify_ctx::temp_htab hash table

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo dnovi...@google.com wrote: On 2012-12-01 20:44 , Lawrence Crowl wrote: Index: gcc/gimple-fold.c === --- gcc/gimple-fold.c(revision 193902) +++ gcc/gimple-fold.c(working copy) @@ -30,6

Re: [cxx-conversion] LTO-related hash tables

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo dnovi...@google.com wrote: On 2012-12-01 20:40 , Lawrence Crowl wrote: Change LTO-related hash tables from htab_t to hash_table: lto-streamer.h output_block::string_hash_table lto-streamer-in.c file_name_hash_table lto-streamer.c tree_htab The struct

Re: [cxx-conversion] gimplify_ctx::temp_htab hash table

2012-12-04 Thread Lawrence Crowl
On 12/4/12, Diego Novillo dnovi...@google.com wrote: On Tue, Dec 4, 2012 at 4:23 AM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Dec 3, 2012 at 9:14 PM, Lawrence Crowl cr...@googlers.com wrote: On 12/3/12, Diego Novillo dnovi...@google.com wrote: On 2012-12-01 20:44 , Lawrence

[cxx-conversion] Fix hash_table build problems with checking enabled.

2012-12-10 Thread Lawrence Crowl
)); + gcc_assert (hash (p1) == hash (p2)); #endif - return 1; + return true; } struct gimplify_ctx -- Lawrence Crowl

[cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-11 Thread Lawrence Crowl
) $(GIMPLE_H) $(CGRAPH_H) $(TREE_FLOW_H) \ $(IPA_PROP_H) $(DIAGNOSTIC_H) statistics.h \ $(PARAMS_H) $(TARGET_H) $(FLAGS_H) \ $(DBGCNT_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H) -- Lawrence Crowl

[cxx-conversion] Convert various htab_t tables to hash_table

2012-12-11 Thread Lawrence Crowl
true if the loop body BODY includes any function calls. */ -- Lawrence Crowl

[cxx-conversion] Convert tree-vectorizer.h'_loop_vec_info::peeling_htab to hash_table

2012-12-11 Thread Lawrence Crowl
()) +LOOP_VINFO_PEELING_HTAB (loop_vinfo).create (1); vectype = STMT_VINFO_VECTYPE (stmt_info); nelements = TYPE_VECTOR_SUBPARTS (vectype); -- Lawrence Crowl

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-12 Thread Lawrence Crowl
On 12/12/12, Diego Novillo dnovi...@google.com wrote: On Dec 11, 2012 Lawrence Crowl cr...@googlers.com wrote: Convert tree-sra.c'candidates from htab_t to hash_table. Fold uid_decl_map_hash and uid_decl_map_eq into new struct uid_decl_hasher. This change moves the definitions from tree

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-16 Thread Lawrence Crowl
On 12/13/12, Martin Jambor mjam...@suse.cz wrote: On Thu, Dec 13, 2012 at 11:05:49AM -0800, Lawrence Crowl wrote: On 12/12/12, Jakub Jelinek ja...@redhat.com wrote: On Tue, Dec 11, 2012 at 02:44:41PM -0800, Lawrence Crowl wrote: +/* Hash a tree in a uid_decl_map. */ + +inline

[cxx-conversion] Convert remaining tree-parloops.c htab_t to hash_table.

2012-12-17 Thread Lawrence Crowl
); /* Parallelization will cause new function calls to be inserted through -- Lawrence Crowl

[cxx-conversion] Change tree-ssa-coalesce.c'coalesce_list_d.list to hash_table

2012-12-17 Thread Lawrence Crowl
); tree var2 = ssa_name (node-second_element); -- Lawrence Crowl

Re: [cxx-conversion] Change tree-ssa-coalesce.c'coalesce_list_d.list to hash_table

2012-12-17 Thread Lawrence Crowl
On 12/17/12, Richard Biener richard.guent...@gmail.com wrote: On Mon, Dec 17, 2012 at 8:36 PM, Lawrence Crowl cr...@googlers.com wrote: Change tree-ssa-coalesce.c'coalesce_list_d.list from htab_t to hash_table. Fold coalesce_pair_map_hash and coalesce_pair_map_eq into new struct

Re: [PATCH] Fix up sbitmap bitmap_{and,ior,xor} (PR target/55562)

2012-12-18 Thread Lawrence Crowl
) sbitmap_verify_popcount (dst); #endif - return anychange; + return changed != 0; } /* Return nonzero if A is a subset of B. */ -- Lawrence Crowl

[cxx-conversion] Change uses of htab_t in gcc/config to hash_table.

2012-12-18 Thread Lawrence Crowl
. */ -- Lawrence Crowl

Re: [patch] std::unique_ptrT[], D improvements

2012-12-27 Thread Lawrence Crowl
to Geoffrey and Lawrence for input and test cases. Tested x86_64-linux, committed to trunk. I'm not getting errors when converting from derived to base. E.g. the following compiles, when it should not. std::unique_ptrconst base [] acb_ad(new derived[3]); -- Lawrence Crowl

Re: [patch] std::unique_ptrT[], D improvements

2013-01-01 Thread Lawrence Crowl
On 12/28/12, Jonathan Wakely jwakely@gmail.com wrote: On 28 December 2012 01:51, Lawrence Crowl wrote: I'm not getting errors when converting from derived to base. E.g. the following compiles, when it should not. std::unique_ptrconst base [] acb_ad(new derived[3]); I get an error: shm

Re: [patch] std::unique_ptrT[], D improvements

2013-01-01 Thread Lawrence Crowl
On 1/1/13, Jonathan Wakely jwakely@gmail.com wrote: On 1 January 2013 20:40, Lawrence Crowl wrote: That was pilot error on my part. However, I've been having trouble when the argument to the constructor or reset has a conversion operator. The code does distinquish between a safe

[google 4_7] backport std::unique_ptrT[], D improvements

2013-01-03 Thread Lawrence Crowl
{ target *-*-* } 1776 } +// { dg-error static assertion failed { target *-*-* } 1778 } #include utility -- Lawrence Crowl

Re: [patch] std::unique_ptrT[], D improvements

2013-01-03 Thread Lawrence Crowl
only correct conversions. As Jonathan notes, Howard has objected to that part of the PR, so it's possible the eventual resolution will differ in that respect; I intend to pick up that discussion next week when I'm back from vacation. BTW, I've attached my latest set of tests. -- Lawrence Crowl

Re: [cxx-conversion] Change uses of htab_t in gcc/config to hash_table.

2013-01-06 Thread Lawrence Crowl
); which is not as friendly. Agreed. Agreed. The current structure was handy in the conversion process. Now that the conversion is done, we could change the order. David On Tue, Dec 18, 2012 at 8:02 PM, Lawrence Crowl cr...@googlers.com wrote: Update various config htab_t uses to hash_table

Re: [PATCH 1/2] [asan] Allow creating/deleting hash table entries with new/delete

2013-01-28 Thread Lawrence Crowl
) +{ + delete p; +} /* Helpful type for a no-op remove. */ -- 1.7.11.7 -- Dodji -- Lawrence Crowl

[cxx-conversion] Add Record Builder Class

2013-02-12 Thread Lawrence Crowl
+ + #endif /* GCC_TREE_H */ -- Lawrence Crowl

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Lawrence Crowl
On 2/13/13, Diego Novillo dnovi...@google.com wrote: On Tue, Feb 12, 2013 at 2:47 PM, Lawrence Crowl cr...@google.com wrote: @@ -182,24 +163,9 @@ default_emutls_var_init (tree to, tree d static tree get_emutls_object_type (void) { - tree type, type_name, field; - - type

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Lawrence Crowl
On 2/13/13, Diego Novillo dnovi...@google.com wrote: Thanks. The patch is OK for the branch. You can address Nathan's review after he's back and gets a chance to look at it. Let me know when the patch is in. I've got another merge in process. Committed. -- Lawrence Crowl

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Lawrence Crowl
On 2/14/13, Richard Biener richard.guent...@gmail.com wrote: On Tue, Feb 12, 2013 at 8:47 PM, Lawrence Crowl cr...@google.com wrote: Add class record_builder to ease construction of records and unions. Use it in some appropriate places. tree -default_emutls_var_fields (tree type

[pph] Buffer overrun in preprocessor symbol replay

2011-03-09 Thread Lawrence Crowl
, which is was no longer large enough to hold the definition string. Split cpp_idents_used::max_length and cpp_lookaside::max_length into max_ident_len and max_value_len. In cpp_lt_replay, allocate the buffer based on the sum of max_ident_len and max_value_len. -- Lawrence Crowl src.change

[pph] Macro Validation (issue4379044)

2011-04-07 Thread Lawrence Crowl
. Adjust tests to reflect changes. There is still one unexpected failure, p1mean.cc does not compare equal in assembly. Not yet investigated. gcc/testsuite/ChangeLog.pph 2011-04-06 Lawrence Crowl cr...@google.com * g++.dg/pph/p1mean.cc: Now pass validation. * g++.dg/pph

[pph] Test PPH include at global scope. (issue4399041)

2011-04-12 Thread Lawrence Crowl
Add a test to ensure that PPH files are #included at global scope. Initially, this test is XFAIL, as it's a low priority error. Index: gcc/testsuite/ChangeLog.pph 2011-04-12 Lawrence Crowl cr...@google.com * g++.dg/pph/y2smother.cc: New. Index: gcc/testsuite/g++.dg/pph/y2smother.cc

Re: [pph] Pickle some more language-dependent fields (issue4389050)

2011-04-12 Thread Lawrence Crowl
*); -- This patch is available for review at http://codereview.appspot.com/4389050 -- Lawrence Crowl

Re: [pph] Reconstruct a header file from a pph image (issue4392047)

2011-04-12 Thread Lawrence Crowl
*filename) -- This patch is available for review at http://codereview.appspot.com/4392047 -- Lawrence Crowl

Re: [pph] Stream merging information (issue 5090041)

2011-09-22 Thread Lawrence Crowl
children of namespaces. -- Lawrence Crowl

[pph] More merging. (issue5222045)

2011-10-06 Thread Lawrence Crowl
structs, which we may need due to users binding directly to members. Index: gcc/testsuite/ChangeLog.pph 2011-10-06 Lawrence Crowl cr...@google.com * g++.dg/pph/c4inline.cc: Clarify failure. * g++.dg/pph/x4keyno.cc: Clarify failure. * g++.dg/pph/x4keyex.cc: Clarify

[pph] De-inline streamer functions. (issue5245043)

2011-10-07 Thread Lawrence Crowl
Move several static inline functions from pph-streamer.h to pph-streamer-{out,in}.c. This is part 1 of several patches, and minimizes diffs. Index: gcc/cp/ChangeLog.pph 2011-10-07 Lawrence Crowl cr...@google.com * pph-streamer.h (pph_out_tree_array): Remove unused

De-inline streamer functions part 2 (issue5250042)

2011-10-07 Thread Lawrence Crowl
Move several static inline functions from pph-streamer.h to pph-streamer-{out,in}.c. This is part 2 of several patches, and minimizes diffs. Index: gcc/cp/ChangeLog.pph 2011-10-07 Lawrence Crowl cr...@google.com * pph-streamer.h (pph_in_chain): Moved to pph-streamer-in.c as extern

De-inline streamer functions part 3 (issue5247042)

2011-10-07 Thread Lawrence Crowl
Remove #if 0 scaffolding. This is part 3 of several patches, and minimizes diffs. Index: gcc/cp/ChangeLog.pph 2011-10-07 Lawrence Crowl cr...@google.com * pph-streamer.h: Remove #if 0 scaffolding. Index: gcc/cp/pph-streamer.h

[pph] Make pph.h _the_ interface header. (issue5247044)

2011-10-07 Thread Lawrence Crowl
This patch makes pph.h the single interface header for PPH. The pph-streamer.h header is now an internal header for use within the pph*.c files. Some declarations have moved from one header to the other to make that possible. Index: gcc/cp/ChangeLog.pph 2011-10-07 Lawrence Crowl cr

[pph] More DECL merging. (issue5268042)

2011-10-12 Thread Lawrence Crowl
. This will eventually help with member declaration versus definition issues. Change test cases to reflect the above. Comment on other failing tests. Comment on failing cache handling for merge. Tested on x64. Index: gcc/testsuite/ChangeLog.pph 2011-10-12 Lawrence Crowl cr...@google.com

[pph] Rename functions to match convention. (issue5269041)

2011-10-12 Thread Lawrence Crowl
2011-10-12 Lawrence Crowl cr...@google.com * pph-streamer-out.c (pph_write_any_tree): Rename to pph_out_any_tree. (pph_write_mergeable_links): Rename to pph_out_mergeable_links. (pph_write_tree_body): Rename to pph_out_tree_body. (pph_write_tree_header

[pph] Remove old tracing. (issue5271041)

2011-10-12 Thread Lawrence Crowl
Remove old trace facility. Having done so, rename pph_new_trace_tree to pph_trace_tree and remove its unused stream parameter. Adjust callers to match. Bootstrap and PPH tests. Index: gcc/cp/ChangeLog.pph 2011-10-12 Lawrence Crowl cr...@google.com * pph-streamer.h (enum

[pph] Triage test status. (issue5271044)

2011-10-13 Thread Lawrence Crowl
Mark test x3hardorder.cc as passing. Update many other tests to indicate their current failure reason. Fix the readme. Index: gcc/testsuite/ChangeLog.pph 2011-10-13 Lawrence Crowl cr...@google.com * g++.dg/pph/README: Put z files in regular expression. * g++.dg/pph

[pph] Fix merging for namespaces. (issue5280048)

2011-10-14 Thread Lawrence Crowl
are merging only the global namespace. Subsequent patches will merge nested namespaces and classes. Tested on x64. Index: gcc/testsuite/ChangeLog.pph 2011-10-14 Lawrence Crowl cr...@google.com * g++.dg/pph/c3variables.cc: Mark fixed. * g++.dg/pph/c4vardef.cc: Mark fixed

[pph] Refactor Vectors and Chains (issue5263051)

2011-10-16 Thread Lawrence Crowl
, but now causes an ICE to surface, which will be addressed later. Tested on x64. Index: gcc/testsuite/ChangeLog.pph 2011-10-16 Lawrence Crowl cr...@google.com * g++.dg/pph/x4tmplfuncinln.cc: Change failure to ICE. * g++.dg/pph/x4tmplfuncninl.cc: Likewise. * g++.dg/pph

[pph] Function Merging (issue5278047)

2011-10-17 Thread Lawrence Crowl
on x64. 2011-10-16 Lawrence Crowl cr...@google.com Index: gcc/testsuite/ChangeLog.pph * g++.dg/pph/c4inline.cc: Change to ICE in cgraph. * g++.dg/pph/x1keyed.cc: Likewise. * g++.dg/pph/x1keyno.cc: Likewise. * g++.dg/pph/x4keyed.cc: Likewise. * g++.dg/pph

Re: [pph] Make libcpp symbol validation a warning (issue5235061)

2011-10-21 Thread Lawrence Crowl
that all others we could reasonably complain to the maintainers of the code. -- Lawrence Crowl

Re: thoughts on libatomic

2012-04-23 Thread Lawrence Crowl
use a lock in this case? Andrew, you had a bit of back-and-forth with someone about this. Can you dig that up? yes, this keeps coming up again and again I think you should take it up with Lawrence Crowl... He was the one, (along with some input from Jeffrey Yasskin

Turn check macros into functions. (issue6188088)

2012-05-15 Thread Lawrence Crowl
. See http://sourceware.org/bugzilla/show_bug.cgi?id=12940.) Tested on x86-64. Index: gcc/ChangeLog.cxx-conversion 2012-05-15 Lawrence Crowl cr...@google.com * tree.h (tree_check): New. (TREE_CHECK): Use inline function above instead of __extension__. (tree_not_check

Re: Turn check macros into functions. (issue6188088)

2012-05-16 Thread Lawrence Crowl
values. That's of course not exactly the same. The checking fns should be able to unconditionally use const_tree anyway. The two versions are inline templates functions versus macros. I expect the non-template version would be roughly the same size as the template version. -- Lawrence Crowl

Re: Turn check macros into functions. (issue6188088)

2012-05-17 Thread Lawrence Crowl
On 5/17/12, Tom Tromey tro...@redhat.com wrote: Lawrence == Lawrence Crowl cr...@google.com writes: Tom Doesn't this mean that if you have checking enabled, and you use Tom the wrong macro on some tree, cc1 will crash? That seems like Tom a distinct minus to me. Lawrence Yes, it does mean

Re: Turn check macros into functions. (issue6188088)

2012-05-18 Thread Lawrence Crowl
On 5/17/12, Mike Stump mikest...@comcast.net wrote: On May 17, 2012, at 2:41 PM, Lawrence Crowl wrote: Reusing the compiler for this seems like the only way to go. But, we did look at using g++ to parse C++ expressions from gdb, and it was too slow :-(. We're going to look again, at least

Re: Turn check macros into functions. (issue6188088)

2012-05-18 Thread Lawrence Crowl
, if the compiler is doing no inlining, we should still get near to that 3% reduction in binary size. -- Lawrence Crowl

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-23 Thread Lawrence Crowl
On 5/23/12, Diego Novillo dnovi...@google.com wrote: OK for cxx-conversion branch? LGTM. -- Lawrence Crowl

Re: [cxx-conversion] Convert vec.[ch] to C++ [2/3] (issue6236043)

2012-05-23 Thread Lawrence Crowl
On 5/23/12, Diego Novillo dnovi...@google.com wrote: Part 2 of the VEC C++ conversion. This patch implements the gengtype changes. LGTM. -- Lawrence Crowl

Re: [cxx-conversion] Convert vec.[ch] to C++ [3/3] (issue6236044)

2012-05-23 Thread Lawrence Crowl
On 5/23/12, Diego Novillo dnovi...@google.com wrote: Part 3 of the VEC C++ conversion. This patch implements all the client code changes needed by the API changes made by the first patch. LGTM. -- Lawrence Crowl

Re: Turn check macros into functions. (issue6188088)

2012-05-23 Thread Lawrence Crowl
On 5/21/12, Mike Stump mikest...@comcast.net wrote: On May 18, 2012, at 7:48 PM, Lawrence Crowl wrote: On 5/17/12, Mike Stump mikest...@comcast.net wrote: On May 17, 2012, at 2:41 PM, Lawrence Crowl wrote: Reusing the compiler for this seems like the only way to go. But, we did look at using

Re: Turn check macros into functions. (issue6188088)

2012-05-23 Thread Lawrence Crowl
* functions in cc1 from Alexander the debugger. Yeah, why didn't I remember that? I think it should suffice. Thanks for the reminder. Should I add that to my patch to gdbinit.in? -- Lawrence Crowl

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-24 Thread Lawrence Crowl
On 5/24/12, Gabriel Dos Reis g...@integrable-solutions.net wrote: On May 24, 2012 Lawrence Crowl cr...@google.com wrote: Add a type-safe hash table, typed_htab. Uses of this table replace uses of libiberty's htab_t. The benefits include less boiler-plate code, full type safety

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-24 Thread Lawrence Crowl
, but leave the bulk of the call site changes to later changes directly on trunk? -- Lawrence Crowl

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-25 Thread Lawrence Crowl
. I'll do that ASAP. -- Lawrence Crowl

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-25 Thread Lawrence Crowl
axes, which is a predictor of trouble. So, instead we chose to take a more incremental approach, exploiting C++ with the existing algorithms and requiring mostly mechanical changes in client code. Both the hash table and vector patches take that approach. -- Lawrence Crowl

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-25 Thread Lawrence Crowl
. -- Lawrence Crowl

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-25 Thread Lawrence Crowl
of the language: int *p = *foo(3); Here there is no implication that foo binds more closely to either the * or the (, so the form is consistent with the grammar. We can go further and have the spacing reinforce the grammar, but lines will get longer. -- Lawrence Crowl

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-25 Thread Lawrence Crowl
On 5/24/12, Jakub Jelinek ja...@redhat.com wrote: On Thu, May 24, 2012 at 09:43:42AM -0700, Lawrence Crowl wrote: Add a type-safe hash table, typed_htab. Uses of this table replace uses of libiberty's htab_t. The benefits include less boiler-plate code, full type safety, and improved

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-25 Thread Lawrence Crowl
On 5/25/12, Mike Stump mikest...@comcast.net wrote: On May 25, 2012, at 10:50 AM, Lawrence Crowl wrote: Diego and I looked long and hard at this issue. It all came down to a sequence of problems. First, libstdc++ isn't rigged for GTY, If portability to other C++ compilers wasn't

[cxx-conversion] Update hash-table to new coding conventions. (issue6430066)

2012-07-23 Thread Lawrence Crowl
-20 Lawrence Crowl cr...@google.com * hash-table.h (xcallocator::control_alloc): Move definition out of class. (xcallocator::data_alloc): Likewise. (xcallocator::control_free): Likewise. (xcallocator::data_free): Likewise. (struct hash_table): Use

[cxx-conversion] Update hash-table to new coding conventions. (Part 2) (issue6435049)

2012-07-23 Thread Lawrence Crowl
Change new C++ code to follow the new C++ coding conventions. This patch is part two, which changes the spacing for the bodies of methods formerly defined in-class. The two-part approach makes diffs sensible. Index: gcc/ChangeLog.cxx-conversion 2012-07-23 Lawrence Crowl cr...@google.com

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Lawrence Crowl
On 8/7/12, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 7, 2012 at 2:35 AM, Lawrence Crowl cr...@google.com wrote: Convert double_int from a struct with function into a class with operators and methods. This patch adds the methods and operators. In general functions

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Lawrence Crowl
On 8/7/12, Mike Stump mikest...@comcast.net wrote: On Aug 6, 2012, at 5:35 PM, Lawrence Crowl wrote: Convert double_int from a struct with function into a class with operators and methods. We have a wide_int class that replaces this class. :-( Really? Where? I don't see neither definition

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
On 8/7/12, Mike Stump mikest...@comcast.net wrote: On Aug 7, 2012, at 11:42 AM, Lawrence Crowl wrote: On 8/7/12, Mike Stump mikest...@comcast.net wrote: On Aug 6, 2012, at 5:35 PM, Lawrence Crowl wrote: Convert double_int from a struct with function into a class with operators

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
On 8/7/12, Richard Henderson r...@redhat.com wrote: On 08/06/2012 05:35 PM, Lawrence Crowl wrote: +inline double_int +double_int::operator ++ () +{ + *this + double_int_one; + return *this; +} + +inline double_int +double_int::operator -- () +{ + *this - double_int_one

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
On 8/7/12, Mike Stump mikest...@comcast.net wrote: On Aug 7, 2012, at 11:38 AM, Lawrence Crowl wrote: Hm. There seems to be significant opinion that there should not be any implicit conversions. I am okay with operations as above, but would like to hear the opinions of others

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
On 8/8/12, Richard Guenther richard.guent...@gmail.com wrote: On Aug 7, 2012 Lawrence Crowl cr...@google.com wrote: We should probably think about naming conventions for mutating operations, as I expect we will want them eventually. Right. In the end I would prefer explicit constructors

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
On 8/8/12, Richard Guenther richard.guent...@gmail.com wrote: On Aug 7, 2012 Lawrence Crowl cr...@google.com wrote: On 8/7/12, Richard Guenther richard.guent...@gmail.com wrote: For most parts overloads that take an (unsigned) HOST_WIDE_INT argument would be nice, as well as the ability

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
double_ints with cross-sign ints by adding undefined overloads. I think we should do that and make all such crossings explicit. However, I want to wait for a separate patch. -- Lawrence Crowl

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
); } void method_caller (type arg1, type arg2) { type var1 (global); type var2 = arg2; arg1.method (arg2); var1.method (var2); } -- Lawrence Crowl

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Lawrence Crowl
is used in trees, which are in a union, and so double_int must be a POD until trees are no longer unions. -- Lawrence Crowl

[cxx-conversion] Avoid overloaded double_int 'constructor'. (issue6441127)

2012-08-09 Thread Lawrence Crowl
Convert overloaded double_int::make to non-overloaded from_signed and from_unsigned. This change is intended to preserve the exact semantics of the existing expressions using shwi_to_double_int and uhwi_to_double_int. Tested on x86_64. Index: gcc/ChangeLog 2012-08-09 Lawrence Crowl cr

Re: [cxx-conversion] Support garbage-collected C++ templates

2012-08-10 Thread Lawrence Crowl
by tags. -- Lawrence Crowl

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
need symmetric overloads because, for the most part, the change would have no effect on client code. -- Lawrence Crowl

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
conventions. 2012-08-12 Lawrence Crowl cr...@google.com * hash-table.h (typedef double_int): Change to struct (POD). (double_int::make): New overloads for int to double-int conversion. Isn't that double_int::from_* now? Yes. +typedef struct double_int

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
. Second, it results in more concise code. Third, it results in potentially faster code. I think we should be able to use those operators. When I run through changing call sites, I really want to change the sites to the final form, not do two passes. -- Lawrence Crowl

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/13/12, Richard Henderson r...@redhat.com wrote: On 08/13/2012 01:22 PM, Lawrence Crowl wrote: yes, it is just as confusing and a bug as 2.3 + 1; is in plain C. Yes, it is a bug. It's a bit disturbing that it wasn't caught in bootstrap. You'll recall that I pointed it out last

Re: [patch] timevar TLC

2012-08-14 Thread Lawrence Crowl
for 'timevars[1].name') But of course the variable definition would look more like #define DEFTIMEVAR(identifier__, name__) \ { , name__, ... }, struct def var[] = { #include timevar.def }; -- Lawrence Crowl

Re: Merge C++ conversion into trunk (4/6 - hash table rewrite)

2012-08-15 Thread Lawrence Crowl
. Others may choose differently. Together we will learn where the tradeoffs lie. More in a later response. -- Lawrence Crowl

Re: Merge C++ conversion into trunk (4/6 - hash table rewrite)

2012-08-15 Thread Lawrence Crowl
conventions say to put member function definitions out of line. -- Lawrence Crowl

Re: Merge C++ conversion into trunk (4/6 - hash table rewrite)

2012-08-15 Thread Lawrence Crowl
not much like _t names either. -- Lawrence Crowl

Re: Merge C++ conversion into trunk (4/6 - hash table rewrite)

2012-08-16 Thread Lawrence Crowl
On 8/16/12, Richard Guenther rguent...@suse.de wrote: On Wed, 15 Aug 2012, Lawrence Crowl wrote: On 8/15/12, Richard Henderson r...@redhat.com wrote: On 2012-08-15 07:29, Richard Guenther wrote: + typedef typename Element::Element_t Element_t; Can we use something less ugly than

Re: Merge C++ conversion into trunk (0/6 - Overview)

2012-08-20 Thread Lawrence Crowl
in the wrong report? -- Lawrence Crowl

Re: Change double_int calls to new interface.

2012-09-05 Thread Lawrence Crowl
On 9/5/12, Richard Guenther rguent...@suse.de wrote: On Tue, 4 Sep 2012, Lawrence Crowl wrote: Modify gcc/*.[hc] double_int call sites to use the new interface. This change entailed adding a few new methods to double_int. Other changes will happen in separate patches. Once all uses

Re: Change double_int calls to new interface.

2012-09-05 Thread Lawrence Crowl
On 9/5/12, Marc Glisse marc.gli...@inria.fr wrote: On Wed, 5 Sep 2012, Lawrence Crowl wrote: On 9/5/12, Richard Guenther rguent...@suse.de wrote: The tmin.cmp (tmax, uns) 0 kind of things look odd - definitely methods like tmin.gt (tmax, uns) would be nice to have. Or even better, get rid

Re: Change double_int calls to new interface.

2012-09-11 Thread Lawrence Crowl
on the condition that generates the error? -- Lawrence Crowl

Re: Backtrace library [1/3]

2012-09-11 Thread Lawrence Crowl
? That parameter could then be modeled as 'this' parameter, addressing Gaby's suggesting. -- Lawrence Crowl

Re: Backtrace library [1/3]

2012-09-12 Thread Lawrence Crowl
On 9/12/12, Ian Lance Taylor i...@google.com wrote: On Sep 11, 2012 Lawrence Crowl cr...@googlers.com wrote: On 9/11/12, Ian Lance Taylor i...@google.com wrote: This patch is the interface to and configury of libbacktrace. I've separated these out as the parts of libbacktrace

Re: Change double_int calls to new interface.

2012-09-12 Thread Lawrence Crowl
On 9/12/12, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Tue, 11 Sep 2012 17:03:39 -0700 From: Ian Lance Taylor i...@google.com On Tue, Sep 11, 2012 at 3:12 PM, Lawrence Crowl cr...@googlers.com wrote: On 9/11/12, Andreas Schwab sch...@linux-m68k.org wrote: Mark Kettenis mark.kette

Re: [pph] Expect checksums for tests marked with pph asm xdiff (issue4744043)

2011-07-15 Thread Lawrence Crowl
, LGTM. -- Lawrence Crowl

Re: [pph] Expect checksums for tests marked with pph asm xdiff (issue4744043)

2011-07-15 Thread Lawrence Crowl
On 7/15/11, Lawrence Crowl cr...@google.com wrote: On 7/15/11, Gabriel Charette gch...@google.com wrote: This patch adds an expected checksum for the tests expecting an asm diff. This way if we were expecting an asm diff, still get one, but a different one, we know (before this patch we would

  1   2   3   >